From 256afefa50174722512464e2c1aecb3ed650c12d Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 27 Jul 2012 18:56:55 -0700 Subject: [PATCH] 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 --- examples/cwebp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cwebp.c b/examples/cwebp.c index 9f933cff..2ca8d7e2 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -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) {