Changeset: a257b3e35ebc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a257b3e35ebc
Modified Files:
        clients/mapilib/mapi.c
        sql/backends/monet5/sql_result.c
Branch: protocol
Log Message:

fixed freeing results


diffs (28 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -5605,7 +5605,7 @@ mapi_fetch_row(MapiHdl hdl)
                                result->tuple_count += res->row_count;
                                result->rows_read++;
                                if(hdl->mid->protobuf_res) {
-                                       
mhapi__query_result__free_unpacked(NULL, hdl->mid->protobuf_res);
+                                       
mhapi__query_result__free_unpacked(hdl->mid->protobuf_res, NULL);
                                }
                                hdl->mid->protobuf_res = (void*) res;
                                return result->fieldcnt;
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -2150,7 +2150,11 @@ static int mvc_export_resultset_prot10(r
                        assert(mhapi__query_result__get_packed_size(&msg) <= 
bsize);
                        assert(bs2_buffer(s).pos == 0);
                        bs2_setpos(s, mhapi__query_result__pack(&msg, 
(uint8_t*) bs2_buffer(s).buf));
-                       mnstr_flush(s);
+                       if (mnstr_flush(s) < 0) {
+                               fprintf(stderr, "Failed to flush.\n");
+                               fres = -1;
+                               goto cleanup;
+                       }
 // TODO: free columns
                        srow = row;
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to