X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Fconf.c;h=1cf0907ad884bf204060e6bd6f8f7df79f7d0bb1;hp=9e3a626ba34d5112fa83d15e6ca24585a37b8dd9;hb=b082db07f0c522527fc95fc97f3e99eb0579c0cc;hpb=8ce37aa529d4d3cc5503605a5a4355395aeb1bd2 diff --git a/lttng/conf.c b/lttng/conf.c index 9e3a626ba..1cf0907ad 100644 --- a/lttng/conf.c +++ b/lttng/conf.c @@ -148,19 +148,12 @@ error: /* * config_get_default_path * - * Return the default path to config directory which is the current working - * directory. User must free() the returned allocated string. + * Return the HOME directory path. The output is dup so the user MUST + * free(3) the returned string. */ char *config_get_default_path(void) { - char *alloc_path; - - alloc_path = getcwd(NULL, 0); - if (alloc_path == NULL) { - perror("getcwd"); - } - - return alloc_path; + return strdup(getenv("HOME")); } /*