On 08/04/2011 07:00 PM, Alex Jia wrote:
closelog:
- VIR_FREE(buf);
-
if (VIR_CLOSE(logfd) < 0) {
char ebuf[1024];
VIR_WARN("Unable to close logfile: %s",
virStrerror(errno, ebuf, sizeof ebuf));
}
VIR_FREE(buf);
Right, this is a double free, Eric, Hasn't Coverity found this issue?
It's not a double free, since the first VIR_FREE sets buf to NULL,
making the second one a no-op, which is why Coverity won't warn about it.
--
Eric Blake eblake@xxxxxxxxxx +1-801-349-2682
Libvirt virtualization library http://libvirt.org
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list