X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fafb-export.c;h=2c6522f050e1d7ef6e16309a8dcb55ef69532bbb;hb=ce53d8ec8550965084304e975a0636b40d7e64a7;hp=b46e6a085251b3df3ab150c622c584d725a23316;hpb=60cd11786766ebc148b7ec088962dd6e112f8762;p=src%2Fapp-framework-binder.git diff --git a/src/afb-export.c b/src/afb-export.c index b46e6a08..2c6522f0 100644 --- a/src/afb-export.c +++ b/src/afb-export.c @@ -1372,7 +1372,7 @@ static struct afb_export *create( return NULL; } lenapi = strlen(apiname); - export = calloc(1, sizeof *export + 1 + lenapi + (path == apiname || !path ? 0 : strlen(path))); + export = calloc(1, sizeof *export + 1 + lenapi + (path == apiname || !path ? 0 : 1 + strlen(path))); if (!export) errno = ENOMEM; else {