From da037170c4bb63eab0887fe26c15ae3d3e60b809 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 22 Mar 2023 20:15:19 +0800 Subject: [PATCH] edit-util: alloc correct amount of memory --- src/shared/edit-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c index b59f129528..f1eb7987f4 100644 --- a/src/shared/edit-util.c +++ b/src/shared/edit-util.c @@ -71,7 +71,7 @@ int edit_files_add( if (edit_files_contains(context, path)) return 0; - if (!GREEDY_REALLOC0(context->files, context->n_files + 2)) + if (!GREEDY_REALLOC(context->files, context->n_files + 1)) return log_oom(); new_path = strdup(path); -- 2.25.1