summaryrefslogtreecommitdiffstats
path: root/python/examples/inspect_vm.py
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-23 12:12:33 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-23 12:12:33 +0000
commita6a0b9ba164f68dd79782f054604102017bc9c15 (patch)
treefd19a529e2bbd66c81ee578bde14a323d0b874f3 /python/examples/inspect_vm.py
parentfae8d7cafb66e0da697cde71f7e9444165c76ff7 (diff)
downloadlibguestfs-a6a0b9ba164f68dd79782f054604102017bc9c15.tar.gz
libguestfs-a6a0b9ba164f68dd79782f054604102017bc9c15.tar.xz
libguestfs-a6a0b9ba164f68dd79782f054604102017bc9c15.zip
lib: Fix memory leak and simplify command code.
Fix the following memory leak found by valgrind: ==13629== 498 (112 direct, 386 indirect) bytes in 1 blocks are definitely lost in loss record 99 of 110 ==13629== at 0x4A06B2F: calloc (vg_replace_malloc.c:593) ==13629== by 0x4CA564E: guestfs_safe_calloc (alloc.c:71) ==13629== by 0x4CA9B02: guestfs___new_command (command.c:143) ==13629== by 0x4CA66E9: guestfs___build_appliance (appliance.c:690) ==13629== by 0x4CBD1B9: launch_libvirt (launch-libvirt.c:188) ==13629== by 0x402E7E: main (virt-filesystems.c:349) Also adjust the command code in several places to make it simpler. We can almost always call guestfs___cmd_close right after guestfs___cmd_run, avoiding any need to close the handle along error paths. Tested by running the test suite under valgrind.
Diffstat (limited to 'python/examples/inspect_vm.py')
0 files changed, 0 insertions, 0 deletions