xcache: Handle null argument for xlate_cache_uninit().
Most other OVS libraries' delete and uninitialization functions allow a
null argument, but this one would cause a segfault.
Acked-by: Ben Pfaff
@@ -279,6 +279,9 @@ xlate_cache_clear(struct xlate_cache *xcache)
void
xlate_cache_uninit(struct xlate_cache *xcache)
{
+ if (!xcache) {
+ return;
+ }
xlate_cache_clear(xcache);
ofpbuf_uninit(&xcache->entries);
}
