1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-28 21:47:18 +03:00
Alex Jia 98b942c6f5 tests: plug memory leak on linuxTestNodeInfo
Detected by valgrind. Leak introduced in commit 82ff25e.

* tests/nodeinfotest.c: avoid memory leak on nodeinfo test case.

* how to reproduce?
  % cd tests && valgrind -v --leak-check=full ./nodeinfotest

* actual valgrind result:

==22147== 65 bytes in 1 blocks are definitely lost in loss record 14 of 29
==22147==    at 0x4A0610F: realloc (vg_replace_malloc.c:525)
==22147==    by 0x330D6FED94: __vasprintf_chk (in /lib64/libc-2.12.so)
==22147==    by 0x426697: virVasprintf (stdio2.h:199)
==22147==    by 0x426757: virAsprintf (util.c:1695)
==22147==    by 0x41585F: linuxTestNodeInfo (nodeinfotest.c:108)
==22147==    by 0x416B21: virtTestRun (testutils.c:141)
==22147==    by 0x4157EA: mymain (nodeinfotest.c:140)
==22147==    by 0x416217: virtTestMain (testutils.c:696)
==22147==    by 0x330D61ECDC: (below main) (in /lib64/libc-2.12.so)
==22147==
==22147== LEAK SUMMARY:
==22147==    definitely lost: 65 bytes in 1 blocks
==22147==    indirectly lost: 0 bytes in 0 blocks
==22147==      possibly lost: 0 bytes in 0 blocks
==22147==    still reachable: 126,126 bytes in 1,341 blocks

Signed-off-by: Alex Jia <ajia@redhat.com>
2011-12-13 10:03:01 +01:00
..
2011-12-05 13:02:54 +01:00
2010-05-12 08:41:10 +02:00
2011-07-11 19:38:51 +02:00
2011-12-01 13:49:20 -07:00
2011-04-29 10:21:20 -06:00
2011-11-18 10:32:49 -07:00
2011-06-30 18:04:02 +01:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2011-06-24 08:01:10 -06:00
2011-12-01 13:49:20 -07:00
2011-12-01 13:49:20 -07:00
2011-12-05 13:02:54 +01:00
2011-12-01 13:49:20 -07:00
2011-12-01 13:49:20 -07:00
2011-12-01 13:49:20 -07:00
2011-04-29 10:21:20 -06:00
2010-05-12 08:41:10 +02:00
2011-12-01 13:49:20 -07:00
2010-05-12 08:41:10 +02:00
2011-07-11 09:21:37 -06:00
2011-10-24 15:42:52 -06:00
2009-07-16 15:06:42 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2011-12-01 14:12:59 -07:00
2011-12-01 14:12:59 -07:00
2010-05-12 08:41:10 +02:00
2011-12-01 13:49:20 -07:00
2011-07-11 19:38:51 +02:00
2011-07-11 19:38:51 +02:00
2011-12-01 13:49:20 -07:00