Menu

#8 memory leaks found by valgrind

open
nobody
None
5
2008-09-06
2008-09-06
Paul Wise
No

valgrind --leak-check=full xgalaga
==9676== Memcheck, a memory error detector.
==9676== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9676== Using LibVEX rev 1854, a library for dynamic binary translation.
==9676== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9676== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
==9676== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9676== For more details, rerun with: -v
==9676==
Trouble opening high scores file '/home/pabs/.xgalscores'
==9676== Warning: invalid file descriptor -1 in syscall close()
xgal.sndsrv: Couldn't open DSP /dev/dsp
==9676== Warning: invalid file descriptor -1 in syscall close()
==9676==
==9676== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 35 from 3)
==9676== malloc/free: in use at exit: 115,602 bytes in 634 blocks.
==9676== malloc/free: 16,197 allocs, 15,563 frees, 1,265,483 bytes allocated.
==9676== For counts of detected errors, rerun with: -v
==9676== searching for pointers to 634 not-freed blocks.
==9676== checked 437,672 bytes.
==9676==
==9676== 16 bytes in 2 blocks are definitely lost in loss record 14 of 106
==9676== at 0x4C20FEB: malloc (vg_replace_malloc.c:207)
==9676== by 0x5C4CDB1: strdup (in /lib/libc-2.7.so)
==9676== by 0x410F1F: w_MakeWindow (makewindow.c:411)
==9676== by 0x4110F1: W_MakeWindow (makewindow.c:469)
==9676== by 0x408521: main (main.c:1337)
==9676==
==9676==
==9676== 44 (24 direct, 20 indirect) bytes in 1 blocks are definitely lost in loss record 33 of 106
==9676== at 0x4C210C2: realloc (vg_replace_malloc.c:429)
==9676== by 0x59CC3D8: xpmParseExtensions (in /usr/lib/libXpm.so.4.11.0)
==9676== by 0x59CB1F9: xpmParseDataAndCreate (in /usr/lib/libXpm.so.4.11.0)
==9676== by 0x59C6152: XpmCreateImageFromData (in /usr/lib/libXpm.so.4.11.0)
==9676== by 0x59C63D2: XpmCreatePixmapFromData (in /usr/lib/libXpm.so.4.11.0)
==9676== by 0x412BE7: W_LoadImage (image.c:171)
==9676== by 0x408800: getImage (images.c:6898)
==9676== by 0x40AE79: init_explosions (explosions.c:160)
==9676== by 0x408651: main (main.c:1366)
==9676==
==9676==
==9676== 288 bytes in 1 blocks are definitely lost in loss record 73 of 106
==9676== at 0x4C200FC: calloc (vg_replace_malloc.c:397)
==9676== by 0x4E27527: XF86VidModeGetAllModeLines (in /usr/lib/libXxf86vm.so.1.0.0)
==9676== by 0x411699: W_ToggleFullscreen (makewindow.c:616)
==9676== by 0x4085B9: main (main.c:1344)
==9676==
==9676== LEAK SUMMARY:
==9676== definitely lost: 328 bytes in 4 blocks.
==9676== indirectly lost: 20 bytes in 3 blocks.
==9676== possibly lost: 0 bytes in 0 blocks.
==9676== still reachable: 115,254 bytes in 627 blocks.
==9676== suppressed: 0 bytes in 0 blocks.
==9676== Reachable blocks (those to which a pointer was found) are not shown.
==9676== To see them, rerun with: --leak-check=full --show-reachable=yes

Discussion


Log in to post a comment.