Changeset: e697ea595bc1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e697ea595bc1
Modified Files:
        monetdb5/modules/mal/mal_mapi.c
Branch: default
Log Message:

proper error when running out of memory


diffs (24 lines):

diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -160,6 +160,20 @@ doChallenge(stream *in, stream *out) {
 #endif
        bs = bstream_create(fdin, 128 * BLOCK);
 
+       if (bs == NULL){
+               if (fdin) {
+                       mnstr_close(fdin);
+                       mnstr_destroy(fdin);
+               }
+               if (fdout) {
+                       mnstr_close(fdout);
+                       mnstr_destroy(fdout);
+               }
+               if (buf)
+                       GDKfree(buf);
+               GDKsyserror("SERVERlisten:"MAL_MALLOC_FAIL);
+               return;
+       }
        bs->eof = 1;
        MSscheduleClient(buf, challenge, bs, fdout);
 }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to