[PATCH 05/14] bup: remove redundant allocation doubling

0 views
Skip to first unread message

Rob Browning

unread,
Sep 11, 2021, 5:35:11 PM9/11/21
to bup-...@googlegroups.com
Thanks to Johannes Berg for pointing out the issue.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
lib/cmd/bup.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/lib/cmd/bup.c b/lib/cmd/bup.c
index 33b8077f..61e88dbb 100644
--- a/lib/cmd/bup.c
+++ b/lib/cmd/bup.c
@@ -271,7 +271,6 @@ static char *exe_parent_dir(const char * const argv_0)
break;
if (!INT_MULTIPLY_OK(path_n, 2, &path_n))
die(2, "memory buffer for executable path would be too big\n");
- path_n *= 2;
if (path != sbuf) free(path);
path = malloc(path_n);
if (!path)
--
2.30.2

Reply all
Reply to author
Forward
0 new messages