X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Ftracefile-array.cpp;fp=src%2Fbin%2Flttng-relayd%2Ftracefile-array.cpp;h=73a2887941517275c4a860e89f71dab92585f3c8;hp=8b1b533d5d60e8520344531ff3f3813d36030591;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/bin/lttng-relayd/tracefile-array.cpp b/src/bin/lttng-relayd/tracefile-array.cpp index 8b1b533d5..73a288794 100644 --- a/src/bin/lttng-relayd/tracefile-array.cpp +++ b/src/bin/lttng-relayd/tracefile-array.cpp @@ -17,11 +17,11 @@ struct tracefile_array *tracefile_array_create(size_t count) struct tracefile_array *tfa = NULL; int i; - tfa = (tracefile_array *) zmalloc(sizeof(*tfa)); + tfa = zmalloc(); if (!tfa) { goto error; } - tfa->tf = (tracefile *) zmalloc(sizeof(*tfa->tf) * count); + tfa->tf = calloc(count); if (!tfa->tf) { goto error; }