Signed-off-by: Christian Babeux <[email protected]>
---
 src/bin/lttng/conf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/lttng/conf.c b/src/bin/lttng/conf.c
index c1bfcfd..7439c1c 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 <my_session>)");
+               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");
-- 
1.8.1.3


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to