Changeset: 2714dafcfdba for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2714dafcfdba
Modified Files:
        MonetDB5/src/mal/mal_client.mx
Branch: default
Log Message:

Remove garbage in critical section
It seems concurrent activity could lead to accessing freed stuff.


diffs (26 lines):

diff -r 044ed5def379 -r 2714dafcfdba MonetDB5/src/mal/mal_client.mx
--- a/MonetDB5/src/mal/mal_client.mx    Sun May 16 22:33:20 2010 +0200
+++ b/MonetDB5/src/mal/mal_client.mx    Mon May 17 08:57:32 2010 +0200
@@ -409,6 +409,11 @@
        }
        for (c = mal_clients; c < mal_clients+MAL_MAXCLIENTS; c++) {
                if (c->mode == AWAITING && c->scenario == s->name) {
+                       /* remove garbage from previous session */
+                       if( c->nspace) {
+                               freeModule(c->nspace);
+                               c->nspace=0;
+                       }
                        c->mode = CLAIMED;
                        break;
                }
@@ -497,10 +502,6 @@
        if ((c = MCnewClient()) == NULL)
                return NULL;
 
-       if( c->nspace) {
-               freeModule(c->nspace);
-               c->nspace=0;
-       }
        c->user = user; 
        c->scenario = NULL;
        c->oldscenario = NULL;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to