summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-03-24 11:41:20 +0900
committerCedric BAIL <cedric.bail@samsung.com>2014-03-24 11:41:20 +0900
commita9d38e6df72176ef497682d6265ddeb99372cfd1 (patch)
treeeb7ef57a0b255e7e6ab2598ab2b71689fc73f6d0 /src
parentcc9526cd7fec35255d27cbd77334c13db0f3eb03 (diff)
evas: cleaner fail handler.
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index f34bd88..8b5b8fb 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -372,11 +372,7 @@ _evas_gl_common_version_check()
372 return 0; 372 return 0;
373 373
374 tmp = strchr(version, '.'); 374 tmp = strchr(version, '.');
375 if (!tmp) 375 if (!tmp) goto fail;
376 {
377 free(version);
378 return 0;
379 }
380 /* the first '.' always exists */ 376 /* the first '.' always exists */
381 *tmp = '\0'; 377 *tmp = '\0';
382 major = atoi(version); 378 major = atoi(version);
@@ -389,6 +385,8 @@ _evas_gl_common_version_check()
389 /* *tmp is ' ' : version is major_number.minor_number followed by vendor */ 385 /* *tmp is ' ' : version is major_number.minor_number followed by vendor */
390 *tmp = '\0'; 386 *tmp = '\0';
391 minor = atoi(tmp2); 387 minor = atoi(tmp2);
388
389 fail:
392 free(version); 390 free(version);
393 391
394 if (((major == 1) && (minor >= 4)) || (major >= 2)) 392 if (((major == 1) && (minor >= 4)) || (major >= 2))