Changeset: a6859d749fde for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6859d749fde
Modified Files:
        monetdb5/mal/mal_linker.c
Branch: Jul2017
Log Message:

Close handle if it's not used.


diffs (20 lines):

diff --git a/monetdb5/mal/mal_linker.c b/monetdb5/mal/mal_linker.c
--- a/monetdb5/mal/mal_linker.c
+++ b/monetdb5/mal/mal_linker.c
@@ -256,12 +256,16 @@ loadLibrary(str filename, int flag)
                filesLoaded[lastfile].modname = GDKstrdup(filename);
                if(filesLoaded[lastfile].modname == NULL) {
                        MT_lock_unset(&mal_contextLock);
+                       if (handle)
+                               dlclose(handle);
                        throw(LOADER, "loadLibrary", RUNTIME_LOAD_ERROR " could 
not allocate space");
                }
                filesLoaded[lastfile].fullname = GDKstrdup(handle ? nme : "");
                if(filesLoaded[lastfile].fullname == NULL) {
                        GDKfree(filesLoaded[lastfile].modname);
                        MT_lock_unset(&mal_contextLock);
+                       if (handle)
+                               dlclose(handle);
                        throw(LOADER, "loadLibrary", RUNTIME_LOAD_ERROR " could 
not allocate space");
                }
                filesLoaded[lastfile].handle = handle ? handle : 
filesLoaded[0].handle;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to