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: 04e72b6b4d ('lldp: use new libnm-lldp instead of systemd's sd_lldp_rx')
This commit is contained in:
Beniamino Galvani
2022-12-22 11:36:11 +01:00
parent 2883203df4
commit 9c4b27e3d2

View File

@@ -908,8 +908,7 @@ nm_lldp_listener_new(int ifindex,
return self; return self;
fail: fail:
if (self) nm_g_slice_free(self);
nm_g_slice_free(self);
return NULL; return NULL;
} }