mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 23:55:23 +00:00
Fix qemu-nbd cleanup crashes
The virLXCControllerAppendNBDPids function didn't properly initialize pids and npids. In case of failure it was crashing when freeing those.
This commit is contained in:
parent
aa6c3fee86
commit
8dd8df6f7c
@ -533,8 +533,8 @@ static int virLXCControllerAppendNBDPids(virLXCControllerPtr ctrl,
|
||||
const char *dev)
|
||||
{
|
||||
char *pidpath = NULL;
|
||||
pid_t *pids;
|
||||
size_t npids;
|
||||
pid_t *pids = NULL;
|
||||
size_t npids = 0;
|
||||
size_t i;
|
||||
int ret = -1;
|
||||
pid_t pid;
|
||||
|
Loading…
Reference in New Issue
Block a user