diff options
author | midipix <writeonce@midipix.org> | 2024-01-21 18:43:30 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-01-22 03:49:50 +0000 |
commit | 55f01bacfe807bbc3fd984726ca6280653d814bf (patch) | |
tree | fbcf785cc0679a164c1e4cc377f2f9273181150d | |
parent | af36ced3526d9a9ddb2ab08404f20ec2a9a89c56 (diff) | |
download | slibtool-55f01bacfe807bbc3fd984726ca6280653d814bf.tar.bz2 slibtool-55f01bacfe807bbc3fd984726ca6280653d814bf.tar.xz |
slbt_split_argv(): object list vector: avoid zero allocation when (argc == 1).
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 2 |
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; |