From 55f01bacfe807bbc3fd984726ca6280653d814bf Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 21 Jan 2024 18:43:30 +0000 Subject: slbt_split_argv(): object list vector: avoid zero allocation when (argc == 1). --- src/driver/slbt_driver_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index 458f9c8..dc68114 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -439,7 +439,7 @@ static int slbt_split_argv( else if (!(sargv->dargs = calloc(1,size+1))) return -1; - else if (!(*aobjlistv = calloc(argc >> 1,sizeof(**aobjlistv)))) { + else if (!(*aobjlistv = calloc(argc,sizeof(**aobjlistv)))) { free(sargv->dargv); free(sargv->dargs); return -1; -- cgit v1.2.3