X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fconf.cpp;h=33550eb3778fe5fb636c0700618b153804f84057;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=4e22ca005c3202917c9f3dbb04a65df1ea7d3d28;hpb=21cf9b6b1843774306a76f4dccddddd706b64f79;p=lttng-tools.git diff --git a/src/bin/lttng/conf.cpp b/src/bin/lttng/conf.cpp index 4e22ca005..33550eb37 100644 --- a/src/bin/lttng/conf.cpp +++ b/src/bin/lttng/conf.cpp @@ -14,11 +14,11 @@ #include #include -#include -#include -#include +#include +#include +#include -#include "conf.h" +#include "conf.hpp" /* * Returns the path with '/CONFIG_FILENAME' added to it; @@ -178,7 +178,7 @@ int _config_read_session_name(const char *path, char **name) #define NAME_MAX_SCANF_IS_A_BROKEN_API "254" #endif - session_name = (char *) zmalloc(NAME_MAX); + session_name = calloc(NAME_MAX); if (session_name == NULL) { ret = -ENOMEM; ERR("Out of memory");