Do not check `NULL` to call free(): free() accepts `NULL`
[babeltrace.git] / tests / plugins / flt.lttng-utils.debug-info / test_bin_info.c
index 38848f2163bbc80fb8bf79a017eadcaea8b83e85..6d29322498fa308114e240c87c2f7c6657df0464 100644 (file)
@@ -167,9 +167,7 @@ void subtest_lookup_function_name(struct bin_info *bin, uint64_t addr,
        ret = bin_info_lookup_function_name(bin, SO_INV_ADDR, &_func_name);
        ok(ret == -1 && _func_name == NULL,
           "bin_info_lookup_function_name - fail on invalid addr");
-       if (_func_name) {
-               free(_func_name);
-       }
+       free(_func_name);
 }
 
 static
This page took 0.024434 seconds and 4 git commands to generate.