Issue878

Title memleak when level size is decreased (due to deleted waypoints?)
Priority bug Status open
Assigned To Keywords editor
Linked issues Watchers

Submitted on 2017-02-21 22h18 by matthiaskrgr, last changed by matthiaskrgr.

Messages
Author: matthiaskrgr Date: 2017-02-21   22h18
Go to lvl 0/town, reduce level size. (each size by 10 or so)
I assume the leaks occur when the game is deleting waypoints because they are no 
longer on the map.

Direct leak of 800 byte(s) in 100 object(s) allocated from:
    #0 0x4daf13 in calloc 
/home/matthias/LLVM/LLVM_dev/stage_2/llvm/projects/compiler-
rt/lib/asan/asan_malloc_linux.cc:74:3
    #1 0x55a647 in dynarray_init 
/home/matthias/vcs/git/freedroid/src/dynarray.c:42:16
    #2 0x62ee56 in decode_waypoints 
/home/matthias/vcs/git/freedroid/src/map.c:909:3
    #3 0x62ee56 in decode_level /home/matthias/vcs/git/freedroid/src/map.c:1117
    #4 0x62afe7 in LoadShip /home/matthias/vcs/git/freedroid/src/map.c:1290:23
    #5 0x5cb932 in prepare_level_editor 
/home/matthias/vcs/git/freedroid/src/init.c:621:2
    #6 0x642e3f in Startup_handle 
/home/matthias/vcs/git/freedroid/src/menu.c:887:3
    #7 0x649049 in RunSubMenu /home/matthias/vcs/git/freedroid/src/menu.c:824:13
    #8 0x648127 in RunMenu /home/matthias/vcs/git/freedroid/src/menu.c:853:2
    #9 0x648127 in StartupMenu /home/matthias/vcs/git/freedroid/src/menu.c:859
    #10 0x6219d8 in main /home/matthias/vcs/git/freedroid/src/main.c:173:4
    #11 0x7fb2506de400 in __libc_start_main /usr/src/debug/glibc-2.24-33-
ge9e69e4/csu/../csu/libc-start.c:289

Direct leak of 640 byte(s) in 1 object(s) allocated from:
    #0 0x4dad2c in malloc 
/home/matthias/LLVM/LLVM_dev/stage_2/llvm/projects/compiler-
rt/lib/asan/asan_malloc_linux.cc:66:3
    #1 0x7fb24ed113b5 in XGetVisualInfo (/lib64/libX11.so.6+0x3f3b5)

Direct leak of 496 byte(s) in 30 object(s) allocated from:
    #0 0x4db0de in realloc 
/home/matthias/LLVM/LLVM_dev/stage_2/llvm/projects/compiler-
rt/lib/asan/asan_malloc_linux.cc:79:3
    #1 0x55b3da in dynarray_resize 
/home/matthias/vcs/git/freedroid/src/dynarray.c:95:17
    #2 0x55b067 in dynarray_add 
/home/matthias/vcs/git/freedroid/src/dynarray.c:131:3
    #3 0x62eeb0 in decode_waypoints 
/home/matthias/vcs/git/freedroid/src/map.c:931:5
    #4 0x62eeb0 in decode_level /home/matthias/vcs/git/freedroid/src/map.c:1117
    #5 0x62afe7 in LoadShip /home/matthias/vcs/git/freedroid/src/map.c:1290:23
    #6 0x5cb932 in prepare_level_editor 
/home/matthias/vcs/git/freedroid/src/init.c:621:2
    #7 0x642e3f in Startup_handle 
/home/matthias/vcs/git/freedroid/src/menu.c:887:3
    #8 0x649049 in RunSubMenu /home/matthias/vcs/git/freedroid/src/menu.c:824:13
    #9 0x648127 in RunMenu /home/matthias/vcs/git/freedroid/src/menu.c:853:2
    #10 0x648127 in StartupMenu /home/matthias/vcs/git/freedroid/src/menu.c:859
    #11 0x6219d8 in main /home/matthias/vcs/git/freedroid/src/main.c:173:4
    #12 0x7fb2506de400 in __libc_start_main /usr/src/debug/glibc-2.24-33-
ge9e69e4/csu/../csu/libc-start.c:289
History
Date User Action Args
2017-02-21 22:18:59matthiaskrgrcreate