From 3e50787c0eec50aea264d4f076d72aa73c0895b4 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 4 Aug 2015 09:29:13 -0400 Subject: [PATCH] BCommandPipe: Fix memory leak. CID 600866. Both the header and the source of the argv getter clearly indicate that the caller must free the memory. --- src/kits/shared/CommandPipe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kits/shared/CommandPipe.cpp b/src/kits/shared/CommandPipe.cpp index b0b1d129ea..e1a3ba2d58 100644 --- a/src/kits/shared/CommandPipe.cpp +++ b/src/kits/shared/CommandPipe.cpp @@ -362,6 +362,7 @@ BCommandPipe::operator<<(const BCommandPipe& arg) for (int32 i = 0; i < argc; i++) AddArg(argv[i]); + free(argv); return *this; }