From 69bdc47081048fc7f49eaf6428c0799681e9046c Mon Sep 17 00:00:00 2001 From: Rajesh PS Date: Thu, 3 Apr 2014 19:16:14 +0900 Subject: [PATCH] elm_map: Fixed a leak when ecore_file_download_full fails Summary: The url variable used for ecore_file_download_full api was not being freed when the api failed @fix Test Plan: elementary_test->map Reviewers: seoz, daniel, raster Reviewed By: raster CC: govi Differential Revision: https://phab.enlightenment.org/D692 --- legacy/elementary/AUTHORS | 1 + legacy/elementary/src/lib/elm_authors.h | 1 + legacy/elementary/src/lib/elm_map.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/legacy/elementary/AUTHORS b/legacy/elementary/AUTHORS index 9bd2402a7f..d291cb8f4d 100644 --- a/legacy/elementary/AUTHORS +++ b/legacy/elementary/AUTHORS @@ -152,3 +152,4 @@ suxia li yan.wang Anand Subhransu Sekhar Mohanty +Rajesh P S diff --git a/legacy/elementary/src/lib/elm_authors.h b/legacy/elementary/src/lib/elm_authors.h index f17abaacd5..a7aee5f53c 100644 --- a/legacy/elementary/src/lib/elm_authors.h +++ b/legacy/elementary/src/lib/elm_authors.h @@ -154,6 +154,7 @@ * @author yan.wang * @author Anand * @author Subhransu Sekhar Mohanty + * @author Rajesh P S * * Please contact to get in * contact with the developers and maintainers. diff --git a/legacy/elementary/src/lib/elm_map.c b/legacy/elementary/src/lib/elm_map.c index 59ade2d0b2..d0fe73947e 100644 --- a/legacy/elementary/src/lib/elm_map.c +++ b/legacy/elementary/src/lib/elm_map.c @@ -3121,6 +3121,7 @@ _name_request(const Evas_Object *obj, free(name->fname); free(name); free(fname); + free(url); return NULL; } INF("Name requested from %s to %s", url, name->fname); @@ -3174,6 +3175,7 @@ _name_list_request(const Evas_Object *obj, ERR("Can't request Name from %s to %s", url, name_list->fname); free(name_list->fname); free(name_list); + free(url); free(fname); return NULL; } @@ -4393,6 +4395,7 @@ _elm_map_route_add(Eo *obj, Elm_Map_Data *sd, Elm_Map_Route_Type type, Elm_Map_R ERR("Can't request Route from %s to %s", url, route->fname); free(route->fname); free(route); + free(url); return ret; } INF("Route requested from %s to %s", url, route->fname);