Changeset: 0b6018784f6b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0b6018784f6b Modified Files: geom/monetdb5/geom.mx Branch: Dec2011 Log Message:
If mbrFromString is called with a valid pointer, don't free it. The problem is when the MAL interpreter calls mbrFromString with a result variable that was used before, we shouldn't free the pointer here since the interpreter will also free it, causing a double free. So instead we just assume that when we get a non-NULL pointer it points to a big enough space. diffs (12 lines): diff --git a/geom/monetdb5/geom.mx b/geom/monetdb5/geom.mx --- a/geom/monetdb5/geom.mx +++ b/geom/monetdb5/geom.mx @@ -492,7 +492,7 @@ geom_export str mbrFromString(mbr **w, s str mbrFromString(mbr **w, str *src) { - int len = 0; + int len = *w ? (int) sizeof(mbr) : 0; char *errbuf; str ex; _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list