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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 12 Jul 2019 18:29:24 +0000 (14:29 -0400)
commit6b934a94886f0cf48325b9fa84172bde09429967
treeb168a15da930f846bfea3f5741e22de5cd150438
parentcdbf0f10d9e3fc086201f5e7a61fa09d6bb22c8b
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.02431 seconds and 4 git commands to generate.