From a7495c7ba8f23eaa1652288d563d8dbb2bf36d58 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 14 Jun 2013 11:54:46 +0100 Subject: [PATCH] edje-codegen: Now really fix the mem leak without running into a double free. The missing free was only for one of the paths to the end label. The other one freed it before already. Take this into account to avoid the double free. Backport from upstream 90aee3addd577461c3bf1b8d52fb816f80c6c45e Change-Id: Ieffc4f5a05f54b21f06819028c9356af3a90648a --- src/bin/edje_codegen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/edje_codegen.c b/src/bin/edje_codegen.c index 2504b97..cd61ef0 100644 --- a/src/bin/edje_codegen.c +++ b/src/bin/edje_codegen.c @@ -811,7 +811,11 @@ _parse_parts(Evas_Object *ed) if (type == EDJE_PART_TYPE_EXTERNAL) { ei = calloc(1, sizeof(Part_External_Info)); - if (!ei) goto end; + if (!ei) + { + free(apiname); + goto end; + } ei->description = description; ei->source = edje_edit_part_source_get(ed, name); ei->apiname = apiname; -- 2.7.4