Changeset: 169e334a4e94 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=169e334a4e94 Modified Files: tools/merovingian/client/monetdb.c Branch: Oct2020 Log Message:
Only free when there was an allocation (i.e. not when call failed). diffs (29 lines): diff --git a/tools/merovingian/client/monetdb.c b/tools/merovingian/client/monetdb.c --- a/tools/merovingian/client/monetdb.c +++ b/tools/merovingian/client/monetdb.c @@ -609,7 +609,6 @@ simple_argv_cmd(char *cmd, sabdb *dbs, c printf("FAILED\n"); fprintf(stderr, "%s: %s\n", cmd, ret); - free(out); free(ret); exit(2); } @@ -1680,7 +1679,8 @@ command_destroy(int argc, char *argv[]) stats->dbname, "stop", 0, mero_pass); if (ret != NULL) free(ret); - free(out); + else + free(out); } } } @@ -1963,6 +1963,7 @@ snapshot_destroy_file(char *path) if (strcmp(out, "OK") != 0) { fprintf(stderr, "snapshot destroy %s: %s\n", path, out); + free(out); exit(2); } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list