Changeset: 452d3b67b7a2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=452d3b67b7a2
Modified Files:
        sql/backends/monet5/sql.c
Branch: Oct2014
Log Message:

Resource leak.


diffs (22 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -2804,6 +2804,7 @@ mvc_import_table_wrap(Client cntxt, MalB
                GDKfree(tsep);
                GDKfree(rsep);
                GDKfree(ssep);
+               GDKfree(filename);
                throw(MAL, "sql.copy_from", MAL_MALLOC_FAIL);
        }
        GDKstrFromStr(ns, *N, len);
@@ -2817,7 +2818,9 @@ mvc_import_table_wrap(Client cntxt, MalB
                GDKfree(rsep);
                GDKfree(ssep);
                GDKfree(ns);
-               throw(IO, "sql.copy_from", "could not open file '%s': %s", 
filename, strerror(errnr));
+               msg = createException(IO, "sql.copy_from", "could not open file 
'%s': %s", filename, strerror(errnr));
+               GDKfree(filename);
+               return msg;
        }
 #if SIZEOF_VOID_P == 4
        s = bstream_create(ss, 0x20000);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to