Ignore NULL pointers passed to nl_cache_free()
This commit is contained in:
parent
22f0ece5ac
commit
f4f7704b0d
1 changed files with 3 additions and 0 deletions
|
@ -264,6 +264,9 @@ void nl_cache_clear(struct nl_cache *cache)
|
|||
*/
|
||||
void nl_cache_free(struct nl_cache *cache)
|
||||
{
|
||||
if (!cache)
|
||||
return;
|
||||
|
||||
nl_cache_clear(cache);
|
||||
NL_DBG(1, "Freeing cache %p <%s>...\n", cache, nl_cache_name(cache));
|
||||
free(cache);
|
||||
|
|
Loading…
Add table
Reference in a new issue