From: David Goulet Date: Mon, 25 Mar 2013 15:03:12 +0000 (-0400) Subject: Fix: validate expanded path NULL ptr in relayd X-Git-Tag: v2.2.0-rc1~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d620da680b1e5fc67bdacaf6150ca2201cad37b7;p=lttng-tools.git Fix: validate expanded path NULL ptr in relayd Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 00b7ea308..082eb7975 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -734,6 +734,10 @@ char *create_output_path_noauto(char *path_name) char *full_path; full_path = utils_expand_path(opt_output_path); + if (!full_path) { + goto exit; + } + ret = asprintf(&traces_path, "%s/%s", full_path, path_name); if (ret < 0) { PERROR("asprintf trace dir name");