diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-05-17 14:53:22 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-05-17 15:04:01 +0900 |
commit | 0feb34927bfbbb39efb5edf103202b10eeea0c31 (patch) | |
tree | 521c9b9a396ee4cb3fb13c4b26b25c5e60c09300 | |
parent | 58a40d6f8a5442882645e38b29efee8ccc68e7c1 (diff) | |
download | efl-0feb34927bfbbb39efb5edf103202b10eeea0c31.tar.gz |
edje_cc - use mem_alloc to fail and exit if alloc fails and fix err out
PVS sudio thought this was odd and it was a bit. not a real issue as a
mem alloc failure herw would still be fatal and simply a crash... as
opposed to a clean "out of mem" and fatal exit then...
error out eally was not finding originally allocated color and the
malloc should have been a mem_alloc() that guarantees a valid memory
return (or termintion of the process).
@fix
-rw-r--r-- | src/bin/edje/edje_cc_handlers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 798857b95d..bbffeca62e 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -8034,7 +8034,7 @@ _copied_map_colors_get(Edje_Part_Description_Common *parent) int i; if (parent->map.colors_count == 0) return NULL; - colors = malloc(sizeof(Edje_Map_Color *) * parent->map.colors_count); + colors = mem_alloc(sizeof(Edje_Map_Color *) * parent->map.colors_count); for (i = 0; i < (int)parent->map.colors_count; i++) { @@ -8043,7 +8043,7 @@ _copied_map_colors_get(Edje_Part_Description_Common *parent) Edje_Map_Color *c = mem_alloc(SZ(Edje_Map_Color)); if (!color) { - ERR("not enough memory"); + ERR("Could not find allocated source when copying map colors"); exit(-1); return NULL; } |