Do not check `NULL` to call free(): free() accepts `NULL`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 12 Jul 2019 04:05:47 +0000 (00:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:35 +0000 (11:53 -0400)
commitb17fd38d0fefbdd46ebfb6fb0390ffd3701410f6
tree4ef9e56a754205b4f36f646a1010da4a035994a6
parent9d210ef3755dc6f3bb10481fcd7416ab72a72a8e
Do not check `NULL` to call free(): free() accepts `NULL`

Semantic patch:

    @@
    expression e;
    @@

    - if (e) { free(e); }
    + free(e);

    @@
    expression e;
    @@

    - if (e != NULL) { free(e); }
    + free(e);

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I4d2d79a8beda4ca1ec7bacd5424c3c8e19d158f0
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1698
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/common/common.c
src/plugins/ctf/common/metadata/decoder.c
src/plugins/ctf/fs-src/metadata.c
tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c
This page took 0.02543 seconds and 4 git commands to generate.