Signed-off-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
- ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
- "/%s-%s", alloc_path, session_name, datetime);
-
+ ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME "/%s-%s",
+ alloc_path, session_name, datetime);
if (ret < 0) {
perror("asprintf trace dir name");
ret = CMD_ERROR;
if (ret < 0) {
perror("asprintf trace dir name");
ret = CMD_ERROR;
ret = CMD_SUCCESS;
error:
ret = CMD_SUCCESS;
error:
+ if (opt_session_name == NULL) {
+ free(session_name);
+ }
+
if (alloc_path) {
free(alloc_path);
}
if (alloc_path) {
free(alloc_path);
}