summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2012-04-22 11:12:01 +0200
committerThomas Graf <tgraf@redhat.com>2012-04-22 11:12:01 +0200
commit8bbcd2208e366f8d8a708d56974966dd7651ffdf (patch)
tree22c90a00a0fdc3464a14182abd8f200cbafc5da8
parent2e93940a86cc78228e8c0b1b7f469d817c6dc178 (diff)
downloadlibnl-8bbcd2208e366f8d8a708d56974966dd7651ffdf.tar.gz
genl: Make genl_unregister() a NOP if NULL pointer is passed
-rw-r--r--lib/genl/mngt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/genl/mngt.c b/lib/genl/mngt.c
index 0ebe74d..963d497 100644
--- a/lib/genl/mngt.c
+++ b/lib/genl/mngt.c
@@ -208,6 +208,9 @@ errout:
*/
void genl_unregister(struct nl_cache_ops *ops)
{
+ if (!ops)
+ return;
+
nl_cache_mngt_unregister(ops);
nl_list_del(&ops->co_genl->o_list);
}