X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fkernel-probe.cpp;h=172527f9a4f33d4cb6cb66db1f10edec9bbf2879;hp=979ca73111dc161b82cc4e6b8872ea5f9f34853c;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/common/kernel-probe.cpp b/src/common/kernel-probe.cpp index 979ca7311..172527f9a 100644 --- a/src/common/kernel-probe.cpp +++ b/src/common/kernel-probe.cpp @@ -117,7 +117,7 @@ lttng_kernel_probe_location_address_create(uint64_t address) struct lttng_kernel_probe_location *ret = NULL; struct lttng_kernel_probe_location_address *location; - location = (lttng_kernel_probe_location_address *) zmalloc(sizeof(*location)); + location = zmalloc(); if (!location) { PERROR("Error allocating userspace probe location."); goto end; @@ -154,7 +154,7 @@ lttng_kernel_probe_location_symbol_create(const char *symbol_name, goto error; } - location = (lttng_kernel_probe_location_symbol *) zmalloc(sizeof(*location)); + location = zmalloc(); if (!location) { PERROR("Failed to allocate kernel symbol probe location"); goto error;