Changeset: 30ab7d501884 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=30ab7d501884
Modified Files:
        gdk/gdk_batop.mx
Branch: bwd
Log Message:

* fixed potential NPE in bat property removal


Unterschiede (23 Zeilen):

diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx
--- a/gdk/gdk_batop.mx
+++ b/gdk/gdk_batop.mx
@@ -2885,15 +2885,15 @@ BATunsetprop(BAT *b, const char* idx)
        } else {
                while(p->next && p->next->id != idx)
                        p = p->next;
-               if (p->next->v.vtype == TYPE_str)
-                       GDKfree(p->next->v.val.sval);
-               {
+               if(p->next){
                        PROPrec *nextnext = p->next->next;
+                       if (p->next->v.vtype == TYPE_str)
+                               GDKfree(p->next->v.val.sval);
                        GDKfree(p->next);
                        p->next = nextnext;
+                       b->batDirtydesc = TRUE;
                }
        }
-       b->batDirtydesc = TRUE;
 }
 
 void
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to