Skip to content

Commit

Permalink
Revert "[dev] if data is null, free it, not safe"
Browse files Browse the repository at this point in the history
This reverts commit f09ea44.
  • Loading branch information
188080501 committed Aug 28, 2024
1 parent 118ad3f commit c1949ca
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions library/JQLibrary/src/JQZopfli/zopflipng/lodepng/lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4733,13 +4733,9 @@ unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h,
if(!(*out))
{
state->error = 83; /*alloc fail*/
return state->error;
}
else
{
data = *out;
state->error = lodepng_convert(*out, data, &state->info_raw, &state->info_png.color, *w, *h);
}
else state->error = lodepng_convert(*out, data, &state->info_raw,
&state->info_png.color, *w, *h);
lodepng_free(data);
}
return state->error;
Expand Down

0 comments on commit c1949ca

Please sign in to comment.