From 8bbcd2208e366f8d8a708d56974966dd7651ffdf Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sun, 22 Apr 2012 11:12:01 +0200 Subject: [PATCH] genl: Make genl_unregister() a NOP if NULL pointer is passed --- lib/genl/mngt.c | 3 +++ 1 file changed, 3 insertions(+) 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); }