Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15962
Modified Files:
monetdb_merocom.c
Log Message:
make sure we also free a possible error (and not try to free NULL)
U monetdb_merocom.c
Index: monetdb_merocom.c
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/monetdb_merocom.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- monetdb_merocom.c 9 Sep 2009 09:50:41 -0000 1.4
+++ monetdb_merocom.c 9 Sep 2009 09:52:11 -0000 1.5
@@ -140,7 +140,8 @@
if (out == NULL && strcmp(res, "OK\n") == 0) {
printf("done\n");
} else {
- printf("FAILED:\n%s", (out == NULL ?
res : out));
+ res = out == NULL ? res : out;
+ printf("FAILED:\n%s", res);
ret = 1;
}
free(res);
@@ -155,7 +156,8 @@
if (out == NULL && strcmp(res, "OK\n") == 0) {
printf("done\n");
} else {
- printf("FAILED:\n%s", (out == NULL ?
res : out));
+ res = out == NULL ? res : out;
+ printf("FAILED:\n%s", res);
ret = 1;
}
free(res);
@@ -172,7 +174,8 @@
snprintf(share, sizeof(share), "share=%s", value);
out = control_send(&res, mero_control, 0,
stats->dbname, share);
if (out != NULL || strcmp(res, "OK\n") != 0) {
- printf("FAILED:\n%s", (out == NULL ? res :
out));
+ res = out == NULL ? res : out;
+ printf("FAILED:\n%s", res);
ret = 1;
}
free(res);
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins