From a734f86071edf25d266c91fec11e649ac51d5724 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Thu, 15 Apr 2010 13:00:54 +0200 Subject: [PATCH] Bugfix: memleak at crash caused by missing arg --- src/core.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.cc b/src/core.cc index ca248ba5..25ec2e42 100644 --- a/src/core.cc +++ b/src/core.cc @@ -148,7 +148,7 @@ struct text_object *construct_text_object(char *s, const char *arg, long #define __OBJ_HEAD(a, n) if (!strcmp(s, #a)) { \ add_update_callback(n); #define __OBJ_IF obj_be_ifblock_if(ifblock_opaque, obj) -#define __OBJ_ARG(...) if (!arg) { CRIT_ERR(obj, free_at_crash, __VA_ARGS__); } +#define __OBJ_ARG(...) if (!arg) { free(s); CRIT_ERR(obj, free_at_crash, __VA_ARGS__); } /* defines to be used below */ #define OBJ(a, n) __OBJ_HEAD(a, n) {