[PATCH] Fix some memory leaks of virsh schedinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

There are some memory leaks at the virsh schedinfo command.
So I fix them.

(e.g.)
When the virDomainSetSchedulerParameters failed, the allocated
memory as params is not freed.
# valgrind --leak-check=full virsh schedinfo PV_RH5_8 --weight 0
==18879== Memcheck, a memory error detector.
==18879== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
*snip*
==18879== 92 bytes in 1 blocks are definitely lost in loss record 6 of 23
==18879==    at 0x40053C0: malloc (vg_replace_malloc.c:149)
==18879==    by 0x80531D5: _vshMalloc (virsh.c:4201)
==18879==    by 0x804BC44: cmdSchedinfo (virsh.c:1033)
==18879==    by 0x80526CF: vshCommandRun (virsh.c:3839)
==18879==    by 0x805452A: main (virsh.c:4741)
==18879==
==18879== LEAK SUMMARY:
==18879==    definitely lost: 92 bytes in 1 blocks.
==18879==      possibly lost: 0 bytes in 0 blocks.
==18879==    still reachable: 14,234 bytes in 293 blocks.
==18879==         suppressed: 0 bytes in 0 blocks.

Signed-off-by: Saori Fukuta <fukuta.saori@xxxxxxxxxxxxxx>

Thanks,
Saori Fukuta

Attachment: fix_schedinfo.patch
Description: Binary data

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]