• Philippe Teuwen's avatar
    Fix mem leak in config file parser · 3d9ebb50
    Philippe Teuwen authored
    This fixes the following leaks:
    
    ==18690== 256 bytes in 1 blocks are definitely lost in loss record 75 of 100
    ==18690==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
    ==18690==    by 0x511613F: regcomp (regcomp.c:487)
    ==18690==    by 0x4E34313: conf_parse_file (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==    by 0x4E349F5: conf_devices_load.constprop.1 (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==    by 0x4E362C0: nfc_context_new (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==    by 0x4E34D08: nfc_init (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==
    ==18690== 32,068 (224 direct, 31,844 indirect) bytes in 1 blocks are definitely lost in loss record 98 of 100
    ==18690==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
    ==18690==    by 0x4C28D6F: realloc (vg_replace_malloc.c:632)
    ==18690==    by 0x5115DF3: re_compile_internal (regcomp.c:760)
    ==18690==    by 0x51161AB: regcomp (regcomp.c:506)
    ==18690==    by 0x4E34313: conf_parse_file (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==    by 0x4E349F5: conf_devices_load.constprop.1 (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==    by 0x4E362C0: nfc_context_new (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    ==18690==    by 0x4E34D08: nfc_init (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
    3d9ebb50
Name
Last commit
Last update
cmake Loading commit data...
contrib Loading commit data...
debian Loading commit data...
examples Loading commit data...
include Loading commit data...
libnfc Loading commit data...
m4 Loading commit data...
test Loading commit data...
utils Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
Doxyfile.in Loading commit data...
HACKING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README-Windows.txt Loading commit data...
configure.ac Loading commit data...
libnfc.conf.sample Loading commit data...
libnfc.pc.in Loading commit data...
make_release.sh Loading commit data...
manual-test-results.txt Loading commit data...
mingw-cross-configure.sh Loading commit data...