Changeset: 57136be0263f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=57136be0263f
Modified Files:
        monetdb5/mal/mal_namespace.c
Branch: Jun2016
Log Message:

Fix cleanup of namespaces after changeset d84ad1a28059.


diffs (27 lines):

diff --git a/monetdb5/mal/mal_namespace.c b/monetdb5/mal/mal_namespace.c
--- a/monetdb5/mal/mal_namespace.c
+++ b/monetdb5/mal/mal_namespace.c
@@ -52,17 +52,15 @@ void initNamespace(void) {
 }
 
 void mal_namespace_reset(void) {
-       int i;
-       NamePtr n,m;
+       struct namespace *ns;
 
        /* assume we are at the end of the server session */
        MT_lock_set(&mal_namespaceLock);
-       for ( i =0; i < MAXIDENTIFIERS; i++){
-               for(n = hash[i]; n; n = m){
-                       m = n->next;
-                       GDKfree(n);
-               }
-               hash[i] = 0;
+       memset(hash, 0, sizeof(hash));
+       while (namespace) {
+               ns = namespace->next;
+               GDKfree(namespace);
+               namespace = ns;
        }
        MT_lock_unset(&mal_namespaceLock);
 }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to