X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fconf.c;h=7e6c833449857890fa7c8e8a092eaf97d439a750;hb=5d5baaa365798454df0fa41879399dd88a8413c1;hp=55ed6352663e8f71dd2f496bf48cf5696d586bec;hpb=8ab7c0d9aa6d5dd0289a8ebc42b743ff0ac649c6;p=lttng-tools.git diff --git a/src/bin/lttng/conf.c b/src/bin/lttng/conf.c index 55ed63526..7e6c83344 100644 --- a/src/bin/lttng/conf.c +++ b/src/bin/lttng/conf.c @@ -16,6 +16,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -24,7 +25,7 @@ #include #include -#include +#include #include #include "conf.h" @@ -143,7 +144,7 @@ void config_destroy(char *path) DBG("Removing %s\n", config_path); ret = remove(config_path); if (ret < 0) { - perror("remove config file"); + PERROR("remove config file"); } end: free(config_path); @@ -190,7 +191,7 @@ char *config_read_session_name(char *path) #define NAME_MAX_SCANF_IS_A_BROKEN_API "254" #endif - session_name = malloc(NAME_MAX); + session_name = zmalloc(NAME_MAX); if (session_name == NULL) { ERR("Out of memory"); goto error;