diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-04-22 11:12:01 +0200 |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-04-22 11:12:01 +0200 |
commit | 8bbcd2208e366f8d8a708d56974966dd7651ffdf (patch) | |
tree | 22c90a00a0fdc3464a14182abd8f200cbafc5da8 | |
parent | 2e93940a86cc78228e8c0b1b7f469d817c6dc178 (diff) | |
download | libnl-8bbcd2208e366f8d8a708d56974966dd7651ffdf.tar.gz |
genl: Make genl_unregister() a NOP if NULL pointer is passed
-rw-r--r-- | lib/genl/mngt.c | 3 |
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); } |