summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-21 18:43:30 +0000
committermidipix <writeonce@midipix.org>2024-01-22 03:49:50 +0000
commit55f01bacfe807bbc3fd984726ca6280653d814bf (patch)
treefbcf785cc0679a164c1e4cc377f2f9273181150d /src
parentaf36ced3526d9a9ddb2ab08404f20ec2a9a89c56 (diff)
downloadslibtool-55f01bacfe807bbc3fd984726ca6280653d814bf.tar.bz2
slibtool-55f01bacfe807bbc3fd984726ca6280653d814bf.tar.xz
slbt_split_argv(): object list vector: avoid zero allocation when (argc == 1).
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c2
1 files changed, 1 insertions, 1 deletions
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;