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:
James Zern 2014-04-28 17:22:29 -07:00
parent bbd358a8e7
commit e0609ade15

View File

@ -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) {