mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
lxc: Allow NULL argument to lxcDomainDefNamespaceFree()
As all other free functions, NULL should be accepted. Even though there currently is no caller that would pass NULL, there will be in future patches. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
4ab1e3bce7
commit
6ac44c6334
@ -195,6 +195,10 @@ lxcDomainDefNamespaceFree(void *nsdata)
|
||||
{
|
||||
size_t i;
|
||||
lxcDomainDefPtr lxcDef = nsdata;
|
||||
|
||||
if (!lxcDef)
|
||||
return;
|
||||
|
||||
for (i = 0; i < VIR_LXC_DOMAIN_NAMESPACE_LAST; i++)
|
||||
g_free(lxcDef->ns_val[i]);
|
||||
g_free(nsdata);
|
||||
|
Loading…
Reference in New Issue
Block a user