From: Mathieu Desnoyers Date: Tue, 18 Jun 2013 19:33:05 +0000 (-0400) Subject: Remove useless if() check X-Git-Tag: v2.2.0-rc3~15 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=52d8ccce6a092485def268cb278485d2820c4954 Remove useless if() check 1022350 Dereference before null check In ust_registry_session_destroy: All paths that lead to this null pointer comparison already dereference the pointer earlier (CWE-476) Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c index 298ddbb6a..e22fc6fcf 100644 --- a/src/bin/lttng-sessiond/ust-registry.c +++ b/src/bin/lttng-sessiond/ust-registry.c @@ -556,8 +556,6 @@ void ust_registry_session_destroy(struct ust_registry_session *reg) } rcu_read_unlock(); - if (reg->channels) { - ht_cleanup_push(reg->channels); - } + ht_cleanup_push(reg->channels); free(reg->metadata); }