Changeset: aeddceef8c61 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aeddceef8c61
Modified Files:
gdk/gdk_bbp.c
Branch: Dec2016
Log Message:
Check result before using it. Especially in the transaction code.
diffs (21 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -3451,11 +3451,15 @@ BBPrecover(int farmid)
gdk_return
BBPrecover_subdir(void)
{
- str subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL);
- DIR *dirp = opendir(subdirpath);
+ str subdirpath;
+ DIR *dirp;
struct dirent *dent;
gdk_return ret = GDK_SUCCEED;
+ subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL);
+ if (subdirpath == NULL)
+ return GDK_FAIL;
+ dirp = opendir(subdirpath);
GDKfree(subdirpath);
if (dirp == NULL) {
return GDK_SUCCEED; /* nothing to do */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list