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

Use correct field to calculate malloc size.
The extra space allocated is for the argv array, so use its type to
calculate the size.  As it happens, maxargs has the same type, but
that isn't *necessarily* the case.  So for now, this is cosmetic.


diffs (12 lines):

diff -r b3c22d98674b -r cb04971a7640 MonetDB5/src/mal/mal_instruction.mx
--- a/MonetDB5/src/mal/mal_instruction.mx       Tue Oct 12 17:33:47 2010 +0200
+++ b/MonetDB5/src/mal/mal_instruction.mx       Tue Oct 12 17:35:29 2010 +0200
@@ -989,7 +989,7 @@
                mb->stmt[mb->stop] = NULL;
        }
        if (p == NULL) {
-               p = GDKzalloc(MAXARG * sizeof(p->maxarg) + sizeof(InstrRecord));
+               p = GDKzalloc(MAXARG * sizeof(p->argv[0]) + 
sizeof(InstrRecord));
                if (p == NULL)
                        return NULL;
                p->maxarg = MAXARG;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to