diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-12-22 11:36:11 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-12-22 11:39:08 +0100 |
commit | 9c4b27e3d28ed18372555c778de8cde7d274d042 (patch) | |
tree | 826c2b0aa6d7724321bef1d538b315884e618115 | |
parent | 2883203df47fabc5785016257aa82effe40b5f8d (diff) |
devices: remove unneeded pointer check
src/core/devices/nm-lldp-listener.c:911: check_after_deref:
Null-checking "self" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Fixes: 04e72b6b4d79 ('lldp: use new libnm-lldp instead of systemd's sd_lldp_rx')
-rw-r--r-- | src/core/devices/nm-lldp-listener.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/devices/nm-lldp-listener.c b/src/core/devices/nm-lldp-listener.c index 40bd3f8eec..ac7e97f0c2 100644 --- a/src/core/devices/nm-lldp-listener.c +++ b/src/core/devices/nm-lldp-listener.c @@ -908,8 +908,7 @@ nm_lldp_listener_new(int ifindex, return self; fail: - if (self) - nm_g_slice_free(self); + nm_g_slice_free(self); return NULL; } |