1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

html_focusable(): use mem_free_set().

This commit is contained in:
Laurent MONIN 2005-11-10 15:38:52 +01:00 committed by Laurent MONIN
parent 29577cad31
commit 2beadb8f6b

View File

@ -246,25 +246,13 @@ html_focusable(struct html_context *html_context, unsigned char *a)
format.tabindex = (tabindex & 0x7fff) << 16; format.tabindex = (tabindex & 0x7fff) << 16;
} }
mem_free_if(format.onclick); mem_free_set(&format.onclick, get_attr_val(a, "onclick", options));
format.onclick = get_attr_val(a, "onclick", options); mem_free_set(&format.ondblclick, get_attr_val(a, "ondblclick", options));
mem_free_set(&format.onmouseover, get_attr_val(a, "onmouseover", options));
mem_free_if(format.ondblclick); mem_free_set(&format.onhover, get_attr_val(a, "onhover", options));
format.ondblclick = get_attr_val(a, "ondblclick", options); mem_free_set(&format.onfocus, get_attr_val(a, "onfocus", options));
mem_free_set(&format.onmouseout, get_attr_val(a, "onmouseout", options));
mem_free_if(format.onmouseover); mem_free_set(&format.onblur, get_attr_val(a, "onblur", options));
format.onmouseover = get_attr_val(a, "onmouseover", options);
mem_free_if(format.onhover);
format.onhover = get_attr_val(a, "onhover", options);
mem_free_if(format.onfocus);
format.onfocus = get_attr_val(a, "onfocus", options);
mem_free_if(format.onmouseout);
format.onmouseout = get_attr_val(a, "onmouseout", options);
mem_free_if(format.onblur);
format.onblur = get_attr_val(a, "onblur", options);
} }
void void