summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinwoo, Lee <minwoo47.lee@samsung.net>2016-01-11 16:49:29 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-01-11 16:49:29 +0900
commitde2bffe9a1c7dce7d1ae54720e30b7d8c1f36523 (patch)
treede2836c19b0b3a018c5a68e99113399a44914420 /src
parent492d0f0f16a0a3e5aab746c026eb580bfa784d92 (diff)
modules/prefs/elm_entry: Add safety check for NULL pointer and fix memory leak
Summary: Add safety check for NULL pointer and fix memory leak Reviewers: cedric, woohyun, Hermet, stefan_schmidt, raster Reviewed By: stefan_schmidt, raster Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D2740
Diffstat (limited to 'src')
-rw-r--r--src/modules/prefs/elm_entry.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/prefs/elm_entry.c b/src/modules/prefs/elm_entry.c
index 301842d41..ac299cba4 100644
--- a/src/modules/prefs/elm_entry.c
+++ b/src/modules/prefs/elm_entry.c
@@ -60,6 +60,7 @@ elm_prefs_entry_value_validate(Evas_Object *obj)
60 size_t min; 60 size_t min;
61 61
62 val = elm_entry_entry_get(obj); 62 val = elm_entry_entry_get(obj);
63 if (!val) return EINA_FALSE;
63 64
64 regex = evas_object_data_get(obj, "accept_regex"); 65 regex = evas_object_data_get(obj, "accept_regex");
65 if (regex) 66 if (regex)
@@ -209,6 +210,7 @@ elm_prefs_entry_add(const Elm_Prefs_Item_Iface *iface EINA_UNUSED,
209 elm_entry_markup_filter_append(obj, elm_entry_filter_limit_size, &limit); 210 elm_entry_markup_filter_append(obj, elm_entry_filter_limit_size, &limit);
210 elm_layout_text_set(obj, NULL, spec.s.placeholder); 211 elm_layout_text_set(obj, NULL, spec.s.placeholder);
211 212
213 regfree(regex);
212 return obj; 214 return obj;
213} 215}
214 216