Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-api-v3: Fix wrong error message
[src/app-framework-binder.git]
/
src
/
afb-api-v3.c
diff --git
a/src/afb-api-v3.c
b/src/afb-api-v3.c
index
11bc35f
..
1bda6b0
100644
(file)
--- a/
src/afb-api-v3.c
+++ b/
src/afb-api-v3.c
@@
-194,8
+194,10
@@
struct afb_api_v3 *afb_api_v3_create(
/* allocates the description */
api = calloc(1, sizeof *api + (copy_info && info ? 1 + strlen(info) : 0));
/* allocates the description */
api = calloc(1, sizeof *api + (copy_info && info ? 1 + strlen(info) : 0));
- if (!api)
+ if (!api) {
+ ERROR("out of memory");
goto oom;
goto oom;
+ }
api->refcount = 1;
if (!info)
api->info = &nulchar;
api->refcount = 1;
if (!info)
api->info = &nulchar;
@@
-223,7
+225,6
@@
oom3:
oom2:
free(api);
oom:
oom2:
free(api);
oom:
- ERROR("out of memory");
return NULL;
}
return NULL;
}