diff options
-rw-r--r-- | ta/ta_talloc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ta/ta_talloc.h b/ta/ta_talloc.h index 2331b4e08e..7194b86601 100644 --- a/ta/ta_talloc.h +++ b/ta/ta_talloc.h @@ -73,6 +73,8 @@ char *ta_talloc_asprintf_append_buffer(char *s, const char *fmt, ...) TA_PRF(2, // mpv specific stuff - should be made part of proper TA API +#define TA_FREEP(pctx) do {if (pctx) {talloc_free(*pctx); (*pctx) = NULL;}} while(0) + #define TA_EXPAND_ARGS(...) __VA_ARGS__ #define MP_TALLOC_AVAIL(p) (talloc_get_size(p) / sizeof((p)[0])) |