From a208097c9091137908beaa1f1f261072df55d3fa Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 30 Jan 2020 09:03:11 -0500 Subject: SEAD - memory leaks --- src/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strings.c') diff --git a/src/strings.c b/src/strings.c index 29d5b65..017af26 100644 --- a/src/strings.c +++ b/src/strings.c @@ -236,7 +236,7 @@ char *join(char **arr, const char *separator) { total_bytes += strlen(arr[i]); records++; } - total_bytes += records * (strlen(separator) + 1); + total_bytes += (records * strlen(separator)) + 1; result = (char *)calloc(total_bytes, sizeof(char)); for (int i = 0; i < records; i++) { -- cgit