forked from ariadne/pkgconf
fixup! cache: set the cache_table to NULL if empty
parent
0c72b7cd41
commit
9d82962160
|
@ -186,11 +186,15 @@ pkgconf_cache_remove(pkgconf_client_t *client, pkgconf_pkg_t *pkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
client->cache_count--;
|
client->cache_count--;
|
||||||
if (client->cache_count == 0)
|
if (client->cache_count == 0) {
|
||||||
|
free(client->cache_table);
|
||||||
client->cache_table = NULL;
|
client->cache_table = NULL;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
client->cache_table = pkgconf_reallocarray(client->cache_table,
|
client->cache_table = pkgconf_reallocarray(client->cache_table,
|
||||||
client->cache_count, sizeof(void *));
|
client->cache_count, sizeof(void *));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue