Changeset: 4fdc969cb89f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4fdc969cb89f
Modified Files:
        MonetDB5/src/mal/mal_instruction.mx
Branch: Oct2010
Log Message:

Check for success of GDKzalloc at the correct time, i.e. before use.


diffs (22 lines):

diff -r 14ff7882903e -r 4fdc969cb89f MonetDB5/src/mal/mal_instruction.mx
--- a/MonetDB5/src/mal/mal_instruction.mx       Wed Sep 08 13:48:02 2010 +0200
+++ b/MonetDB5/src/mal/mal_instruction.mx       Wed Sep 08 13:49:59 2010 +0200
@@ -1660,6 +1660,8 @@
        int actions;
 
        vars= (int *) GDKzalloc(mb->vtop * sizeof(int));
+       if (vars == NULL)
+               return;                                 /* forget it if we run 
out of memory */
 
        /* build the alias table */
        for (i = 0; i < mb->vtop; i++) {
@@ -1713,8 +1715,7 @@
        mnstr_printf(GDKout, "After reduction \n");
        printFunction(GDKout,mb,0,0);
 #endif
-       if (vars)
-               GDKfree(vars);
+       GDKfree(vars);
        mb->vtop = cnt;
 }
 void
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to