This patch fixes a couple of complaints from valgrind when tickling libvirtd with SIGHUP.
The first two files contain fixes for memory leaks. The 3rd one initializes an uninitialized variable. The 4th one is another memory leak.
return NULL;
}
+ VIR_FREE(pool->configFile); // for driver reload
pool->configFile = strdup(path);
if (pool->configFile == NULL) {
virReportOOMError();
return NULL;
}
+ VIR_FREE(pool->configFile); // for driver reload
pool->configFile = strdup(path);
if (pool->configFile == NULL) {
virReportOOMError();
virStoragePoolDefFree(def);
return NULL;
}
+ VIR_FREE(pool->autostartLink); // for driver reload
pool->autostartLink = strdup(autostartLink);
if (pool->autostartLink == NULL) {
virReportOOMError();
x86ModelFree(model);
}
+ while (map->vendors != NULL) {
+ struct x86_vendor *vendor = map->vendors;
+ map->vendors = vendor->next;
+ x86VendorFree(vendor);
+ }
+
VIR_FREE(map);
}
fds[0].fd = outfd;
fds[0].events = POLLIN;
+ fds[0].revents = 0;
finished[0] = 0;
fds[1].fd = errfd;
fds[1].events = POLLIN;
+ fds[1].revents = 0;
finished[1] = 0;
while(!(finished[0] && finished[1])) {