elementary: fix segmentation faults when using elm_prefs

There are several cases of failure:
- if regex is NULL, regfree(regex) may lead to segmentation fault
  (undefined behaviour, as specified in POSIX.1)
- if regex is not NULL, there are cases of use-after-free.

@fix
This commit is contained in:
Jean Guyomarc'h 2016-08-12 16:20:34 +02:00
parent 149a0aae52
commit b6b8289636
1 changed files with 0 additions and 1 deletions

View File

@ -207,7 +207,6 @@ elm_prefs_entry_add(const Elm_Prefs_Item_Iface *iface EINA_UNUSED,
elm_entry_markup_filter_append(obj, elm_entry_filter_limit_size, &limit);
elm_layout_text_set(obj, NULL, spec.s.placeholder);
regfree(regex);
return obj;
}