On 01/16/2014 08:33 AM, Pavel Hrdina wrote: > In a "for" loop there are created two new strings and they may not > be freed if a "target" string cannot be obtained. We have to free > the two created strings to prevent the memory leak. > > This has been found by coverity. > > John also pointed out that we should somehow care about the "type" > and "device" and Osier agreed to exit with error message if one of > them is set to NULL. > > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > --- > version 2: > - initialize "type" and "device" to NULL > - exit with error message if "type" and "device" is NULL > - remove a "if (details)" condition before freeing "type" and "device" > > tools/virsh-domain-monitor.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > ACK John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list