Changeset: f3c2b85025ce for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f3c2b85025ce
Modified Files:
MonetDB5/src/mal/mal_linker.mx
Branch: default
Log Message:
merging bug fix from Jun2010
diffs (24 lines):
diff -r 8b1c92cfef86 -r f3c2b85025ce MonetDB5/src/mal/mal_linker.mx
--- a/MonetDB5/src/mal/mal_linker.mx Wed May 26 17:33:06 2010 +0200
+++ b/MonetDB5/src/mal/mal_linker.mx Thu May 27 20:00:37 2010 +0200
@@ -384,6 +384,12 @@
if (strcmp(e->d_name + strlen(e->d_name) -
strlen(ext), ext) == 0) {
strs[lasts] =
GDKmalloc(strlen(fullname) +
sizeof(DIR_SEP) +
strlen(e->d_name) + 1);
+ if (strs[lasts] == NULL) {
+ while (lasts >= 0)
+ GDKfree(strs[lasts--]);
+ GDKfree(fullname);
+ return NULL;
+ }
sprintf(strs[lasts], "%s%c%s",
fullname, DIR_SEP,
GDKstrdup(e->d_name));
lasts++;
@@ -404,6 +410,7 @@
strcpy(fullname + i, strs[c]);
i += strlen(strs[c]);
fullname[i++] = PATH_SEP;
+ GDKfree(strs[c]);
}
fullname[i - 1] = '\0';
return fullname;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list