Changeset: bb845163d618 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bb845163d618
Modified Files:
gdk/gdk_utils.c
monetdb5/optimizer/opt_pipes.c
Branch: Jun2016
Log Message:
Don't overwrite thread names (fix memory leak).
diffs (25 lines):
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -1269,8 +1269,8 @@ THRnew(const char *name)
PARDEBUG fprintf(stderr, "#nrofthreads %d\n", GDKnrofthreads);
GDKnrofthreads++;
+ s->name = GDKstrdup(name);
}
- s->name = GDKstrdup(name);
MT_lock_unset(&GDKthreadLock);
return s;
diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c
--- a/monetdb5/optimizer/opt_pipes.c
+++ b/monetdb5/optimizer/opt_pipes.c
@@ -454,6 +454,8 @@ compileOptimizer(Client cntxt, str name)
/* don't cleanup thread info since the thread continues
to
* exist, just this client record is closed */
c.errbuf = NULL;
+ /* we must clear c.mythread because we're reusing a
Thread
+ * and must not delete that one */
c.mythread = 0;
/* destroy bstream using free */
free(c.fdin->buf);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list