X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Ftrace-ust.c;h=20e3dc5f149127d16768ad45381c200fb27c2a03;hp=a0d3b1b4165fc26fa87149db9f8a1bf3075a7613;hb=778ca3dd8ad4b1f79ab64aec0abf1134f4bcd1a8;hpb=3735745270b83fc911d8ee39c8437256b3af4e3d diff --git a/lttng-sessiond/trace-ust.c b/lttng-sessiond/trace-ust.c index a0d3b1b41..20e3dc5f1 100644 --- a/lttng-sessiond/trace-ust.c +++ b/lttng-sessiond/trace-ust.c @@ -91,14 +91,13 @@ struct ltt_ust_session *trace_ust_create_session(char *path, unsigned int uid, struct ltt_ust_session *lus; /* Allocate a new ltt ust session */ - lus = malloc(sizeof(struct ltt_ust_session)); + lus = zmalloc(sizeof(struct ltt_ust_session)); if (lus == NULL) { - PERROR("create ust session malloc"); + PERROR("create ust session zmalloc"); goto error; } /* Init data structure */ - lus->consumer_fds_sent = 0; lus->uid = uid; lus->start_trace = 0; @@ -139,7 +138,7 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan, luc = zmalloc(sizeof(struct ltt_ust_channel)); if (luc == NULL) { - perror("ltt_ust_channel malloc"); + perror("ltt_ust_channel zmalloc"); goto error; } @@ -196,7 +195,7 @@ struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev) lue = zmalloc(sizeof(struct ltt_ust_event)); if (lue == NULL) { - PERROR("ust event malloc"); + PERROR("ust event zmalloc"); goto error; } @@ -250,7 +249,7 @@ struct ltt_ust_metadata *trace_ust_create_metadata(char *path) lum = zmalloc(sizeof(struct ltt_ust_metadata)); if (lum == NULL) { - perror("ust metadata malloc"); + perror("ust metadata zmalloc"); goto error; }