]> granicus.if.org Git - libnl/commitdiff
genl: Make genl_unregister() a NOP if NULL pointer is passed
authorThomas Graf <tgraf@redhat.com>
Sun, 22 Apr 2012 09:12:01 +0000 (11:12 +0200)
committerThomas Graf <tgraf@redhat.com>
Sun, 22 Apr 2012 09:12:01 +0000 (11:12 +0200)
lib/genl/mngt.c

index 0ebe74d79983c1573555f31bfe7d3c52edc5110c..963d497e2d49d90c9679da064ba603da5ff6e680 100644 (file)
@@ -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);
 }