X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fconf.c;fp=src%2Fbin%2Flttng%2Fconf.c;h=7439c1cdcf4d0fac711f7a5f4acfbd018a83a773;hp=c1bfcfd45b8d87eacfae6d3be878033121ee85cc;hb=dcee6f19f636b7443cc70dd27911630c4da476fa;hpb=5af40280abf6f969256e044e106f524a2a0df16d diff --git a/src/bin/lttng/conf.c b/src/bin/lttng/conf.c index c1bfcfd45..7439c1cdc 100644 --- a/src/bin/lttng/conf.c +++ b/src/bin/lttng/conf.c @@ -203,6 +203,7 @@ char *config_read_session_name(char *path) if (fp == NULL) { ERR("Can't find valid lttng config %s/.lttngrc", path); MSG("Did you create a session? (lttng create )"); + free(session_name); goto error; } @@ -221,6 +222,7 @@ char *config_read_session_name(char *path) } error_close: + free(session_name); ret = fclose(fp); if (ret < 0) { PERROR("close config read session name");