summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-03-10 19:44:51 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-11 12:32:53 +0100
commit2cd0793578dad27a9f6ff94d55d5061ce5483817 (patch)
tree6291de95d6972d268ca5dabab4d1aea45a824ba9 /Userland
parent292871c4bc63cc7443d71083df603ee55e17945e (diff)
downloadserenity-2cd0793578dad27a9f6ff94d55d5061ce5483817.zip
xargs: Fix boring memory leak
It's only 1K (BUFSIZ), and it's immediately before xargs finishes anyway. However, I ran into it and know how to fix it, so let's clean this up.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/xargs.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Utilities/xargs.cpp b/Userland/Utilities/xargs.cpp
index 68e4eb54e3..8bb7efaaa8 100644
--- a/Userland/Utilities/xargs.cpp
+++ b/Userland/Utilities/xargs.cpp
@@ -198,6 +198,7 @@ bool read_items(FILE* fp, char entry_separator, Function<Decision(StringView)> c
perror("getdelim");
fail = true;
}
+ free(item);
break;
}