[babl] Use common return
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] Use common return
- Date: Thu, 26 Feb 2015 15:07:52 +0000 (UTC)
commit 8d38e65f35f6702d125bfc658e320310f81e2530
Author: Mukund Sivaraman <muks banu com>
Date: Thu Feb 26 20:10:35 2015 +0530
Use common return
babl/babl-model.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/babl/babl-model.c b/babl/babl-model.c
index bb7b734..b181ca2 100644
--- a/babl/babl-model.c
+++ b/babl/babl-model.c
@@ -99,7 +99,7 @@ babl_model_new (void *first_argument,
...)
{
va_list varg;
- Babl *babl;
+ Babl *babl = NULL;
int id = 0;
int components = 0;
const char *arg = first_argument;
@@ -189,8 +189,7 @@ babl_model_new (void *first_argument,
if (!components)
{
babl_log("no components specified for model '%s'", name);
- babl_free(name);
- return NULL;
+ goto out;
}
babl = babl_db_exist (db, id, name);
@@ -210,6 +209,7 @@ babl_model_new (void *first_argument,
"with different components!", name);
}
+ out:
babl_free (name);
return babl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]