diff options
Diffstat (limited to 'src/zencore/commandline.cpp')
| -rw-r--r-- | src/zencore/commandline.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zencore/commandline.cpp b/src/zencore/commandline.cpp index c801bf151..0cdccf986 100644 --- a/src/zencore/commandline.cpp +++ b/src/zencore/commandline.cpp @@ -48,6 +48,11 @@ IterateCommandlineArgs(std::function<void(const std::string_view& Arg)>& Process ArgV[ArgC++] = Arg; Arg = nullptr; // getdelim will allocate buffer for next Arg } + if (Arg) + { + // getdelim allocated one last arg buffer that we didn't use + free(Arg); + } fclose(CmdLineFile); if (ArgC > 1) |