summaryrefslogtreecommitdiff
path: root/src/bin/elementary/elementary_codegen.c
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-09-20 12:11:39 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2019-09-23 11:16:38 +0200
commita819a954bfa005f77b296fddf9de4bfd59f9486f (patch)
tree2adc03947d51d19851c68f3f26672ae24c8ca8b4 /src/bin/elementary/elementary_codegen.c
parent885d5b5b689e14152e9273ae89ba3f4d0bb5049b (diff)
elementary_codegen: check before use to avoid use after free
These might or might not have been freed already, depending on the breaks form the above loop. Before we are having a use after free here better check on it before free'ing another time. Coverity IDs: 1402671, 1402701 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10047
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/elementary_codegen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/elementary/elementary_codegen.c b/src/bin/elementary/elementary_codegen.c
index 2f8324f..28ed576 100644
--- a/src/bin/elementary/elementary_codegen.c
+++ b/src/bin/elementary/elementary_codegen.c
@@ -701,9 +701,13 @@ _programs_parse(Evas_Object *ed)
701 } 701 }
702 702
703 edje_edit_string_free(description); 703 edje_edit_string_free(description);
704 description = NULL;
704 edje_edit_string_free(sig); 705 edje_edit_string_free(sig);
706 sig = NULL;
705 edje_edit_string_free(source); 707 edje_edit_string_free(source);
708 source = NULL;
706 free(apiname); 709 free(apiname);
710 apiname = NULL;
707 } 711 }
708 712
709 edje_edit_string_list_free(programs); 713 edje_edit_string_list_free(programs);