Commit 1330167f authored by Ulrich Sibiller's avatar Ulrich Sibiller

Utils.h: add SAFE_free macro

parent 360cb5dd
...@@ -45,5 +45,6 @@ static inline const char * validateString(const char *str) { ...@@ -45,5 +45,6 @@ static inline const char * validateString(const char *str) {
} }
#define SAFE_XFree(what) do {if (what) {XFree(what); what = NULL;}} while (0) #define SAFE_XFree(what) do {if (what) {XFree(what); what = NULL;}} while (0)
#define SAFE_free(what) do {free(what); what = NULL;} while (0)
#endif /* __Utils_H__ */ #endif /* __Utils_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment