]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lib: add null check to lldpctl_atom_inc_ref()
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 10 Apr 2015 10:45:14 +0000 (13:45 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Tue, 19 May 2015 06:10:54 +0000 (09:10 +0300)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
src/lib/atom.c

index 1d34f6f58367f24666f48ea964ab074a5935bb1b..a7efd6a1ff4d31bd7fa937abd7bba5592703e296 100644 (file)
@@ -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