Fixed double-free in JPEG allocation

It was incorrectly setting the wrong field to NULL, causing it to get
freed again later.
pull/144/head
rmitton 2015-07-06 13:32:40 -07:00
parent b53c08a148
commit fcfa17b847
1 changed files with 1 additions and 1 deletions

View File

@ -2739,7 +2739,7 @@ static int stbi__process_frame_header(stbi__jpeg *z, int scan)
if (z->img_comp[i].raw_data == NULL) {
for(--i; i >= 0; --i) {
STBI_FREE(z->img_comp[i].raw_data);
z->img_comp[i].data = NULL;
z->img_comp[i].raw_data = NULL;
}
return stbi__err("outofmem", "Out of memory");
}