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.
This commit is contained in:
parent
fb4ea396e3
commit
3e50787c0e
@ -362,6 +362,7 @@ BCommandPipe::operator<<(const BCommandPipe& arg)
|
|||||||
for (int32 i = 0; i < argc; i++)
|
for (int32 i = 0; i < argc; i++)
|
||||||
AddArg(argv[i]);
|
AddArg(argv[i]);
|
||||||
|
|
||||||
|
free(argv);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user