cwebp: exit immediately on version mismatch

{Picture,Config}Init don't do allocations and attempting to free any of
their contents on version mismatch will likely cause a crash

Change-Id: I2a5aece235f9680fb406aec4799adceea7f62cfc
This commit is contained in:
James Zern 2012-07-27 18:56:55 -07:00
parent a7cc729126
commit 256afefa50

View File

@ -909,7 +909,7 @@ int main(int argc, const char *argv[]) {
!WebPPictureInit(&original_picture) ||
!WebPConfigInit(&config)) {
fprintf(stderr, "Error! Version mismatch!\n");
goto Error;
return -1;
}
if (argc == 1) {