Hello Andrew,

when the ODBC driver cannot connect the database I receive an error like:

The driver reported the following diagnostics whilst running SQLDriverConnect

IM002:1:0:[iODBC][Driver Manager]Data source name not found and no default 
driver specified. Driver could not be loaded

test.mod:82: error on opening table tb

Model processing error

Assertion failed: count == 0

Error detected in file glplpx17.c at line 1220

Aborted (core dumped)


It is due to a missing xfree.

Please, apply the following patch:
http://glpk.dyndns.org/viewvc/svn/glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c?view=diff&r1=290&r2=289&diff_format=h <http://glpk.dyndns.org/viewvc/svn/glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c?view=diff&r1=290&r2=289&diff_format=h>
(see appendix)

Best regards
Xypron

--- glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c	2008/09/28 18:18:21	289
+++ glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c	2008/10/02 19:37:50	290
@@ -604,6 +604,7 @@
       extract_error("SQLDriverConnect", sql->hdbc, SQL_HANDLE_DBC);
       dl_SQLFreeHandle(SQL_HANDLE_DBC, sql->hdbc);
       dl_SQLFreeHandle(SQL_HANDLE_ENV, sql->henv);
+      xfree(sql);
       return NULL;
    }
    /* set AUTOCOMMIT on*/
_______________________________________________
Bug-glpk mailing list
Bug-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-glpk

Reply via email to