check the pointer before freeded it

This commit is contained in:
Amin Ben Ramdhane 2019-12-03 11:30:18 +01:00
parent b89c48507e
commit 0bef3b715b

View file

@ -47,7 +47,7 @@
#endif
#ifndef FREE
#define FREE(x) do { free(x); x = NULL; } while (0)
#define FREE(x) do { if(x) {free(x); x = NULL;} } while (0)
#endif
extern struct dm_permession_s DMREAD;