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:
parent
149a0aae52
commit
b6b8289636
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue