• Guilherme Maciel Ferreira's avatar
    Fix double free at Log_terminate() · 6b398fc1
    Guilherme Maciel Ferreira authored
    Set to NULL the two static char pointers, trace_destination_name and
    trace_destination_backup_name. Otherwise, there is a double free if
    someone tries to release the same memory more than once (calling the
    Log_terminate() function twice).
    
    ==5781== Invalid free() / delete / delete[] / realloc()
    ==5781==    at 0x4C29CF0: free (vg_replace_malloc.c:530)
    ==5781==    by 0x40DF4C: Log_terminate (Log.c:225)
    ==5781==  Address 0x5495c20 is 0 bytes inside a block of size 13 free'd
    ==5781==    at 0x4C29CF0: free (vg_replace_malloc.c:530)
    ==5781==    by 0x40DF4C: Log_terminate (Log.c:225)
    ==5781==  Block was alloc'd at
    ==5781==    at 0x4C28BF6: malloc (vg_replace_malloc.c:299)
    ==5781==    by 0x40D881: Log_initialize (Log.c:139)
    ==5781==
    ==5781== Invalid free() / delete / delete[] / realloc()
    ==5781==    at 0x4C29CF0: free (vg_replace_malloc.c:530)
    ==5781==    by 0x40DF79: Log_terminate (Log.c:227)
    ==5781==  Address 0x5495c70 is 0 bytes inside a block of size 15 free'd
    ==5781==    at 0x4C29CF0: free (vg_replace_malloc.c:530)
    ==5781==    by 0x40DF79: Log_terminate (Log.c:227)
    ==5781==  Block was alloc'd at
    ==5781==    at 0x4C28BF6: malloc (vg_replace_malloc.c:299)
    ==5781==    by 0x40D8B6: Log_initialize (Log.c:141)
    Signed-off-by: 's avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
    6b398fc1
Name
Last commit
Last update
.settings Loading commit data...
Windows Build Loading commit data...
build Loading commit data...
cmake Loading commit data...
doc Loading commit data...
src Loading commit data...
test Loading commit data...
.cproject Loading commit data...
.gitignore Loading commit data...
.gitreview Loading commit data...
.project Loading commit data...
.pydevproject Loading commit data...
.travis.yml Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
about.html Loading commit data...
build.xml Loading commit data...
edl-v10 Loading commit data...
epl-v10 Loading commit data...
notice.html Loading commit data...
travis-build.sh Loading commit data...
travis-install.sh Loading commit data...