Changeset: 9dd1534614ac for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9dd1534614ac Modified Files: gdk/gdk_logger.c monetdb5/mal/mal_profiler.c sql/storage/bat/bat_storage.c Branch: unlock Log Message:
fixed leak small cleanup diffs (55 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -764,7 +764,7 @@ logger_read_types_file(logger *lg, FILE char atom_name[IDLENGTH]; /* scanf should use IDLENGTH somehow */ - while(fscanf(fp, "%d,%64s\n", &id, atom_name) == 2) { + while(fscanf(fp, "%d,%63s\n", &id, atom_name) == 2) { int i = ATOMindex(atom_name); if (id > 255 || i < 0) { diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c --- a/monetdb5/mal/mal_profiler.c +++ b/monetdb5/mal/mal_profiler.c @@ -175,15 +175,14 @@ renderProfilerEvent(Client cntxt, MalBlk logadd(",\"barrier\":\"%s\"", operatorName(pci->barrier)); if( pci->token < FCNcall || pci->token > PATcall) logadd(",\"operator\":\"%s\"", operatorName(pci->token)); - if (!GDKinmemory() && !GDKembedded()) { - char *uuid = NULL; - str c; - if ((c = msab_getUUID(&uuid)) == NULL) { + if (!GDKinmemory() && !GDKembedded()) { + char *uuid = NULL, *err; + if ((err = msab_getUUID(&uuid)) == NULL) { logadd(",\"session\":\"%s\"", uuid); free(uuid); } else - free(c); - } + free(err); + } logadd(",\"state\":\"%s\"", start?"start":"done"); logadd(",\"usec\":"LLFMT, pci->ticks); diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -1428,7 +1428,6 @@ destroy_segs(segment *s) { if (!s) return; - s = s->next; while(s) { segment *n = s->next; _DELETE(s); @@ -1459,6 +1458,7 @@ destroy_dbat(sql_trans *tr, storage *bat n = bat->next; destroy_cs(&bat->cs); destroy_segments(bat->segs); + _DELETE(bat); bat = n; } return LOG_OK; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list