From: Alexandru Ardelean Date: Fri, 10 Apr 2015 10:45:14 +0000 (+0300) Subject: lib: add null check to lldpctl_atom_inc_ref() X-Git-Tag: 0.7.15~25^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7113d69b9cb40420333aca9fe4b617b4122dce6;p=thirdparty%2Flldpd.git lib: add null check to lldpctl_atom_inc_ref() Signed-off-by: Alexandru Ardelean --- diff --git a/src/lib/atom.c b/src/lib/atom.c index 1d34f6f5..a7efd6a1 100644 --- a/src/lib/atom.c +++ b/src/lib/atom.c @@ -35,7 +35,8 @@ lldpctl_atom_get_connection(lldpctl_atom_t *atom) void lldpctl_atom_inc_ref(lldpctl_atom_t *atom) { - atom->count++; + if (atom) + atom->count++; } void