Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / kernel-probe.cpp
index 979ca73111dc161b82cc4e6b8872ea5f9f34853c..172527f9a4f33d4cb6cb66db1f10edec9bbf2879 100644 (file)
@@ -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<lttng_kernel_probe_location_address>();
        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<lttng_kernel_probe_location_symbol>();
        if (!location) {
                PERROR("Failed to allocate kernel symbol probe location");
                goto error;
This page took 0.023314 seconds and 4 git commands to generate.