diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-30 09:03:11 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-30 09:03:11 -0500 |
| commit | a208097c9091137908beaa1f1f261072df55d3fa (patch) | |
| tree | 8818bfa6c19c4a43b7bb19431a442d3bdfa9a80e /src/strings.c | |
| parent | 7c2b1baad8434f9f7b19efe48719942cb3bce4cd (diff) | |
| download | spmc-a208097c9091137908beaa1f1f261072df55d3fa.tar.gz | |
SEAD - memory leaks
Diffstat (limited to 'src/strings.c')
| -rw-r--r-- | src/strings.c | 2 |
1 files changed, 1 insertions, 1 deletions
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++) { |
