about summary refs log tree commit diff stats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 5c615256..419b290f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -44,6 +44,12 @@
     } \
 }
 
+#define GFREE_SET_NULL(resource) \
+{ \
+    g_free(resource); \
+    resource = NULL; \
+}
+
 void p_slist_free_full(GSList *items, GDestroyNotify free_func);
 void create_dir(char *name);
 char * str_replace(const char *string, const char *substr,