diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 27e2e3a85a..c73bb4f580 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -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;