Fixed double free introduced with rev 1233.
This commit is contained in:
parent
505bf23aa4
commit
c6aedc9eb5
@ -1747,10 +1747,13 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
|
|||||||
|
|
||||||
namelen = 0;
|
namelen = 0;
|
||||||
name = get_rr_fname(t, n->node->name);
|
name = get_rr_fname(t, n->node->name);
|
||||||
if (name != NULL) {
|
if (name == NULL)
|
||||||
namelen = strlen(name);
|
name = strdup("");
|
||||||
free(name);
|
if (name == NULL) {
|
||||||
|
ret = ISO_OUT_OF_MEM;
|
||||||
|
goto add_susp_cleanup;
|
||||||
}
|
}
|
||||||
|
namelen = strlen(name);
|
||||||
sua_free = space - info->suf_len;
|
sua_free = space - info->suf_len;
|
||||||
|
|
||||||
/* Try whether NM, SL, AL will fit into SUA */
|
/* Try whether NM, SL, AL will fit into SUA */
|
||||||
@ -2136,7 +2139,8 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
|
|||||||
return ISO_SUCCESS;
|
return ISO_SUCCESS;
|
||||||
|
|
||||||
add_susp_cleanup: ;
|
add_susp_cleanup: ;
|
||||||
free(name);
|
if (name != NULL)
|
||||||
|
free(name);
|
||||||
if (dest != NULL)
|
if (dest != NULL)
|
||||||
free(dest);
|
free(dest);
|
||||||
susp_info_free(info);
|
susp_info_free(info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user