X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fcreate.c;fp=src%2Fbin%2Flttng%2Fcommands%2Fcreate.c;h=c8027133d2a0666cf9b2f79dc3c556a046293fc1;hb=2f0e04ab6ae6ba7a83c211727db282aee43452c7;hp=2e45d004e62cdf66780a6ac5a9878bff5eccf5ea;hpb=af7f3c88a2e0d819c1f7016209304b380b269d67;p=lttng-tools.git diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index 2e45d004e..c8027133d 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -722,7 +722,9 @@ static int create_session_from_template(struct config_document *template, ret = CMD_ERROR; goto error; } + config_element_free(temp_element); + temp_element = NULL; temp_element = config_element_create("data_uri", tmp_data_uri); @@ -739,6 +741,7 @@ static int create_session_from_template(struct config_document *template, goto error; } config_element_free(temp_element); + temp_element = NULL; break; default: ret = CMD_ERROR; @@ -759,6 +762,10 @@ static int create_session_from_template(struct config_document *template, goto error; } + config_element_free(temp_element_child); + temp_element_child = NULL; + + /* * validate and replace the destination node for each session type * TODO: export string as const and simply assign a base path for the @@ -790,6 +797,8 @@ static int create_session_from_template(struct config_document *template, goto error; } + config_element_free(temp_element); + temp_element = NULL; if (ret) { ERR("%s", lttng_strerror(ret)); @@ -816,6 +825,9 @@ static int create_session_from_template(struct config_document *template, ret = CMD_ERROR; goto error; } + + config_element_free(temp_element); + temp_element = NULL; } ret = config_load_configuration_sessions(template, session_name, 0); @@ -1172,8 +1184,10 @@ static int create_session(void) error: /* Session temp stuff */ + config_document_free(template); free(session_name_date); free(uris); + free(traces_path); if (ret < 0) { ERR("%s", lttng_strerror(ret));