Changeset: dba9a966fc57 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dba9a966fc57
Modified Files:
gdk/gdk_bbp.c
Branch: default
Log Message:
Allocation check
diffs (19 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -982,8 +982,14 @@ BBPreadEntries(FILE *fp, unsigned bbpver
BBP_physical(bid)[sizeof(BBP_physical(bid)) - 1] = 0;
#endif
BBP_options(bid) = NULL;
- if (options)
+ if (options) {
BBP_options(bid) = GDKstrdup(options);
+ if (BBP_options(bid) == NULL) {
+ BATdestroy(bn);
+ TRC_CRITICAL(GDK, "GDKstrdup failed\n");
+ return GDK_FAIL;
+ }
+ }
BBP_refs(bid) = 0;
BBP_lrefs(bid) = 1; /* any BAT we encounter here is
persistent, so has a logical reference */
BBP_desc(bid) = bn;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list