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

Close handle in case of error.


diffs (18 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
@@ -116,12 +116,14 @@ getAddress(stream *out, str modname, str
        adr = (MALfcn) dlsym(dl, fcnname);
        filesLoaded[lastfile].modname = GDKstrdup("libmonetdb5");
        if(filesLoaded[lastfile].modname == NULL) {
+               dlclose(dl);
                if (!silent)
                        showException(out, MAL,"MAL.getAddress", "could not 
allocate space");
                return NULL;
        }
        filesLoaded[lastfile].fullname = GDKstrdup("libmonetdb5");
        if(filesLoaded[lastfile].fullname == NULL) {
+               dlclose(dl);
                GDKfree(filesLoaded[lastfile].modname);
                if (!silent)
                        showException(out, MAL,"MAL.getAddress", "could not 
allocate space");
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to