X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-v3.c;h=1bda6b08233ec2ffe990f08800a99bdc9e09715c;hb=22c9883131a8cac3e1fcf2ebf025518e59536ad0;hp=11bc35ff244819552e83031857c621b67e0c232b;hpb=ee022f72194200537dd32f0bdc9b741806dc4f43;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-v3.c b/src/afb-api-v3.c index 11bc35ff..1bda6b08 100644 --- 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)); - if (!api) + if (!api) { + ERROR("out of memory"); goto oom; + } api->refcount = 1; if (!info) api->info = &nulchar; @@ -223,7 +225,6 @@ oom3: oom2: free(api); oom: - ERROR("out of memory"); return NULL; }