Changeset: 47ebce1cbe73 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/47ebce1cbe73
Modified Files:
        monetdb5/modules/mal/mal_mapi.c
Branch: Jul2021
Log Message:

Don't leak physical reference. Use quick descriptor instead


diffs (30 lines):

diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -1849,12 +1849,11 @@ SERVERput(Client cntxt, MalBlkPtr mb, Ma
                /* generate a tuple batch */
                /* and reload it into the proper format */
                str ht,tt;
-               BAT *b= BATdescriptor(BBPindex(*nme));
+               BAT *b = BBPquickdesc(BBPindex(*nme));
                size_t len;
 
-               if( b== NULL){
-                       throw(MAL,"mapi.put","Can not access BAT");
-               }
+               if (!b)
+                       throw(MAL, "mapi.put", RUNTIME_OBJECT_MISSING);
 
                /* reconstruct the object */
                ht = getTypeName(TYPE_oid);
@@ -1868,8 +1867,8 @@ SERVERput(Client cntxt, MalBlkPtr mb, Ma
                        mapi_close_handle(SERVERsessions[i].hdl);
                SERVERsessions[i].hdl= mapi_query(mid, buf);
 
-               GDKfree(ht); GDKfree(tt);
-               BBPrelease(b->batCacheid);
+               GDKfree(ht);
+               GDKfree(tt);
                break;
                }
        case TYPE_str:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to