Closed memory leak with assert error or memory shortage while creating

SL entry. Coverity CID 12576.
This commit is contained in:
Thomas Schmitt 2015-10-10 11:48:52 +02:00
parent d04abdcfbd
commit fbe7f1e89d
1 changed files with 3 additions and 0 deletions

View File

@ -577,12 +577,15 @@ int rrip_add_SL(Ecma119Image *t, struct susp_info *susp, uint8_t **comp,
* debug purposes
*/
if (ce == 0) {
free(SL);
return ISO_ASSERT_FAILURE;
}
ret = susp_append_ce(t, susp, SL);
if (ret < 0) {
free(SL);
return ret;
}
SL = NULL; /* now owned by susp */
written = i;
total_comp_len = comp[i][1] + 2;
}