Changeset: 4a0b01e4f816 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a0b01e4f816
Modified Files:
        sql/backends/monet5/vaults/shp/shp.c
Branch: default
Log Message:

Proper return upon failure
Don't exit a thread roughly.


diffs (22 lines):

diff --git a/sql/backends/monet5/vaults/shp/shp.c 
b/sql/backends/monet5/vaults/shp/shp.c
--- a/sql/backends/monet5/vaults/shp/shp.c
+++ b/sql/backends/monet5/vaults/shp/shp.c
@@ -65,7 +65,7 @@ GDALWConnection * GDALWConnect(char * so
        conn = malloc(sizeof(GDALWConnection));
        if (conn == NULL) {
                fprintf(stderr, "Could not allocate memory\n");
-               exit(-1);
+               return NULL;
        }
        conn->handler = OGROpen(source, 0 , &(conn->driver));
        if (conn->handler == NULL) {
@@ -86,7 +86,8 @@ GDALWConnection * GDALWConnect(char * so
        conn->fieldDefinitions = malloc(fieldCount * sizeof(OGRFieldDefnH));
        if (conn->fieldDefinitions == NULL) {
                fprintf(stderr, "Could not allocate memory\n");
-               exit(-1);
+               GDKfree(conn);
+               return NULL;    
        }
        for (i=0 ; i<fieldCount ; i++) {
                conn->fieldDefinitions[i] = OGR_FD_GetFieldDefn(featureDefn, i);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to