talloc: add TALLOC_ZERO()
[ira/wip.git] / lib / talloc / talloc.h
index b62393494b6cef28e98aaf8ef31d3f279c8e1be5..0defd4ab0e7d642fb5dc56b02a1603d6b90f6b56 100644 (file)
@@ -115,6 +115,8 @@ typedef void TALLOC_CTX;
 #define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a))
 #endif
 
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+
 /* The following definitions come from talloc.c  */
 void *_talloc(const void *context, size_t size);
 void *talloc_pool(const void *context, size_t size);