forked from enlightenment/enlightenment
Never assign a alloc'ed to a const if we are to free it!
SVN revision: 27923
This commit is contained in:
parent
5ecd954206
commit
49f4f88cd2
|
@ -118,10 +118,10 @@ _e_fdo_menu_to_order_make_apps(const char *name, const char *path, const char *d
|
||||||
if ((order_data.sheap->size) && (!ecore_file_exists(order_data.order_path)))
|
if ((order_data.sheap->size) && (!ecore_file_exists(order_data.order_path)))
|
||||||
{
|
{
|
||||||
Ecore_Sheap *sheap;
|
Ecore_Sheap *sheap;
|
||||||
const char *temp;
|
char *temp;
|
||||||
|
|
||||||
sheap = ecore_sheap_new(ecore_str_compare, 100);
|
sheap = ecore_sheap_new(ecore_str_compare, 100);
|
||||||
temp = ecore_file_get_dir((const char *) order_data.order_path);
|
temp = ecore_file_get_dir(order_data.order_path);
|
||||||
if ((sheap) && (temp))
|
if ((sheap) && (temp))
|
||||||
{
|
{
|
||||||
ecore_sheap_set_free_cb(sheap, free);
|
ecore_sheap_set_free_cb(sheap, free);
|
||||||
|
@ -130,7 +130,7 @@ _e_fdo_menu_to_order_make_apps(const char *name, const char *path, const char *d
|
||||||
/* If we create a dir, we add it to the parents .order file. */
|
/* If we create a dir, we add it to the parents .order file. */
|
||||||
_e_fdo_menu_to_order_add_sheap(sheap, temp, ecore_file_get_file(order_data.order_path));
|
_e_fdo_menu_to_order_add_sheap(sheap, temp, ecore_file_get_file(order_data.order_path));
|
||||||
}
|
}
|
||||||
if (temp) free((char *) temp);
|
if (temp) free(temp);
|
||||||
if (sheap) ecore_sheap_destroy(sheap);
|
if (sheap) ecore_sheap_destroy(sheap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue