Changeset: cd7ecfec101b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cd7ecfec101b
Modified Files:
        gdk/gdk_bbp.c
Branch: Jun2023
Log Message:

If loading the heap fails, we need to unfix.


diffs (22 lines):

diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -3078,11 +3078,14 @@ BATdescriptor(bat i)
                }
                if (incref(i, false, false) > 0) {
                        b = BBP_cache(i);
-                       if (b == NULL)
+                       if (b == NULL) {
                                b = getBBPdescriptor(i);
-               } else {
-                       /* if incref fails, we must return NULL */
-                       b = NULL;
+                               if (b == NULL) {
+                                       /* if loading failed, we need to
+                                        * compensate for the incref */
+                                       decref(i, false, false, __func__);
+                               }
+                       }
                }
                if (lock)
                        MT_lock_unset(&GDKswapLock(i));
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to