Fix leak build config file path

* src/libvirt.c: Free user directory path
This commit is contained in:
Daniel P. Berrange 2011-11-29 16:19:40 +00:00
parent a8bb75a3e6
commit 87e8ff1be1

View File

@ -974,8 +974,11 @@ virConnectConfigFile(void)
goto error;
if (virAsprintf(&path, "%s/.libvirt/libvirt.conf",
userdir) < 0)
userdir) < 0) {
VIR_FREE(userdir);
goto no_memory;
}
VIR_FREE(userdir);
}
return path;