From: Thomas Graf Date: Sun, 22 Apr 2012 09:12:01 +0000 (+0200) Subject: genl: Make genl_unregister() a NOP if NULL pointer is passed X-Git-Tag: libnl3_2_8~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bbcd2208e366f8d8a708d56974966dd7651ffdf;p=libnl genl: Make genl_unregister() a NOP if NULL pointer is passed --- 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); }