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

fixed crash in mapi code


diffs (15 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
@@ -365,6 +365,11 @@ SERVERlistenThread(SOCKET *Sock)
                fflush(stdout);
 #endif
                data = GDKmalloc(sizeof(*data));
+               if (!data) {
+                       closesocket(msgsock);
+                       msg = "memory allocation failed";
+                       goto error;
+               }
                data->in = socket_rastream(msgsock, "Server read");
                data->out = socket_wastream(msgsock, "Server write");
                if (MT_create_thread(&tid, doChallenge, data, MT_THR_JOINABLE)) 
{
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to