Changeset: 6d638383326e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6d638383326e
Modified Files:
        gdk/gdk_heap.c
Branch: default
Log Message:

Even in debug mode, check return values.


diffs (20 lines):

diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -701,10 +701,12 @@ HEAPfree(Heap *h, bool rmheap)
 #ifndef NDEBUG
                } else {
                        char *path = GDKfilepath(h->farmid, BATDIR, 
h->filename, NULL);
-                       /* should not be present */
-                       struct stat st;
-                       assert(stat(path, &st) == -1 && errno == ENOENT);
-                       GDKfree(path);
+                       if (path) {
+                               /* should not be present */
+                               struct stat st;
+                               assert(stat(path, &st) == -1 && errno == 
ENOENT);
+                               GDKfree(path);
+                       }
 #endif
                }
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to