Changeset: d7bb639fb565 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d7bb639fb565
Modified Files:
        monetdb5/mal/mal_debugger.c
Branch: default
Log Message:

Finish changeset fef13d4f92f9:
"error: 'b[1]' may be used uninitialized in this function"


diffs (25 lines):

diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -1495,12 +1495,19 @@ printBatProperties(stream *f, VarPtr n, 
                fcn = getAddress(f, "bat", "bat", "BKCinfo", 0);
                if (fcn) {
                        BAT *b[2];
+                       str res;
 
                        bid = v->val.ival;
                        mnstr_printf(f, "BAT %d %s= ", bid, props);
-                       (*fcn)(&ret, &ret2, &bid);
+                       res = (*fcn)(&ret, &ret2, &bid);
+                       if (res != MAL_SUCCEED) {
+                               GDKfree(res);
+                               mnstr_printf(f, "mal.info failed\n");
+                               return;
+                       }
                        b[0] = BATdescriptor(ret);
-                       if (b[0] == NULL) {
+                       b[1] = BATdescriptor(ret2);
+                       if (b[0] == NULL || b[1] == NULL) {
                                mnstr_printf(f, "Could not access 
descriptor\n");
                                return;
                        }
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to