mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
dwebp: fix exit code on webp load failure
on ExUtilLoadWebP() failure no allocated memory will be returned, so
it's safe to exit immediately. additionally, any webp specific problems
will already have been reported as part of the call to
WebPGetFeatures().
broken since:
4a0e739
dwebp: move webp decoding to example_util
Change-Id: Ibc632015a1f52bae7f96d063252624123fa7c2da
This commit is contained in:
parent
bbd358a8e7
commit
e0609ade15
@ -670,7 +670,7 @@ int main(int argc, const char *argv[]) {
|
||||
size_t data_size = 0;
|
||||
const uint8_t* data = NULL;
|
||||
if (!ExUtilLoadWebP(in_file, &data, &data_size, bitstream)) {
|
||||
goto End;
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (format) {
|
||||
@ -711,7 +711,7 @@ int main(int argc, const char *argv[]) {
|
||||
} else {
|
||||
status = ExUtilDecodeWebP(data, data_size, verbose, &config);
|
||||
}
|
||||
End:
|
||||
|
||||
free((void*)data);
|
||||
ok = (status == VP8_STATUS_OK);
|
||||
if (!ok) {
|
||||
|
Loading…
Reference in New Issue
Block a user