dect
/
libnl
Archived
13
0
Fork 0

Ignore NULL pointers passed to nl_cache_free()

This commit is contained in:
Thomas Graf 2008-04-29 22:58:07 +02:00
parent 22f0ece5ac
commit f4f7704b0d
1 changed files with 3 additions and 0 deletions

View File

@ -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);