From e7113d69b9cb40420333aca9fe4b617b4122dce6 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 10 Apr 2015 13:45:14 +0300 Subject: [PATCH] lib: add null check to lldpctl_atom_inc_ref() Signed-off-by: Alexandru Ardelean --- src/lib/atom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5