summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-11-16 09:16:08 +0100
committerJim Meyering <jim@meyering.net>2006-11-16 09:16:08 +0100
commitb6b438c45dbc5dab7b2d62ae464942e6927b1d17 (patch)
treebf03a20a37adde07f96a879fbdcd6e2165dfa203
parentfc9b802e3d282875e2ad4bcafa954c0ce1c759f8 (diff)
downloadcoreutils-b6b438c45dbc5dab7b2d62ae464942e6927b1d17.tar.xz
* src/csplit.c (load_buffer): Plug an inconsequential leak.
-rw-r--r--ChangeLog2
-rw-r--r--src/csplit.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9bdf549fc..209ff960c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
so we need not free them at all. This is easier than freeing
both buffers at each of the early "return"s.
+ * src/csplit.c (load_buffer): Plug an inconsequential leak.
+
2006-11-15 Jim Meyering <jim@meyering.net>
* .x-po-check: Exclude gl/ files. Otherwise, po-check would
diff --git a/src/csplit.c b/src/csplit.c
index e174ee59e..382fd6621 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -526,6 +526,8 @@ load_buffer (void)
if (lines_found)
save_buffer (b);
+ else
+ free (b);
return lines_found != 0;
}