forked from enlightenment/terminology
termio: fix leak. CID1399746 CID1399747
This commit is contained in:
parent
8076e4673f
commit
485d7a3edf
|
@ -2348,28 +2348,29 @@ _smart_mouseover_apply(Termio *sd)
|
|||
if (casestartswith(s, "mailto:"))
|
||||
{
|
||||
if (!config->active_links_email)
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!config->active_links_url)
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
else if (s[0] == '/')
|
||||
{
|
||||
if (!config->active_links_file)
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
else if (link_is_email(s))
|
||||
{
|
||||
if (!config->active_links_email)
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (sd->link.string)
|
||||
eina_stringshare_del(sd->link.string);
|
||||
sd->link.string = eina_stringshare_add(s);
|
||||
s = NULL;
|
||||
|
||||
if ((x1 == sd->link.x1) && (y1 == sd->link.y1) &&
|
||||
(x2 == sd->link.x2) && (y2 == sd->link.y2))
|
||||
|
@ -2382,6 +2383,9 @@ _smart_mouseover_apply(Termio *sd)
|
|||
sd->link.x2 = x2;
|
||||
sd->link.y2 = y2;
|
||||
_update_link(sd, same_geom);
|
||||
|
||||
end:
|
||||
free(s);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -228,6 +228,7 @@ bad:
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* returned string must be freed */
|
||||
char *
|
||||
termio_link_find(const Evas_Object *obj, int cx, int cy,
|
||||
int *x1r, int *y1r, int *x2r, int *y2r)
|
||||
|
|
Loading…
Reference in New Issue