Cleanup: Replace all perror() uses by the PERROR macro
[lttng-tools.git] / src / bin / lttng / commands / add_context.c
index e50ed84b6e97b9e0e7756ebf4b4a8c3b1bcaffba..cf3f3efcf36f87464e5c5eb05425e6bcfccbbd8e 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <ctype.h>
 #include <popt.h>
 #include <stdio.h>
@@ -715,9 +716,9 @@ int cmd_add_context(int argc, const char **argv)
                                goto end;
                        }
 
-                       type = malloc(sizeof(struct ctx_type));
+                       type = zmalloc(sizeof(struct ctx_type));
                        if (type == NULL) {
-                               perror("malloc ctx_type");
+                               PERROR("malloc ctx_type");
                                ret = CMD_FATAL;
                                goto end;
                        }
This page took 0.024377 seconds and 4 git commands to generate.