Fix mem leak in config file parser (opendir)

This fixes the following leaks:

==30517== 32,808 bytes in 1 blocks are definitely lost in loss record 11 of 12
==30517==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==30517==    by 0x50F4B2A: __alloc_dir (opendir.c:186)
==30517==    by 0x4E34998: conf_devices_load.constprop.1 (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==30517==    by 0x4E36350: nfc_context_new (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==30517==    by 0x4E34D98: nfc_init (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
This commit is contained in:
Philippe Teuwen 2013-03-02 01:21:13 +01:00
parent 3d9ebb5044
commit d7e7abb061

View file

@ -183,6 +183,7 @@ conf_devices_load(const char *dirname, nfc_context *context)
} }
} }
} }
closedir(d);
} }
void void