diff options
author | Mart Lubbers | 2016-01-27 22:11:45 +0100 |
---|---|---|
committer | Mart Lubbers | 2016-01-27 22:11:45 +0100 |
commit | 0bc4354f1fc7e3cf6fc981aa5cb2c71bbc23ecbc (patch) | |
tree | 003b5ef7754a636d8ece30f490cf35f4674e3ab4 /compile.c | |
parent | readline history (diff) |
free up memory after allocation to avoid memory leak
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -75,6 +75,9 @@ int64_t compile(CleanString path, CleanString module) { strcat(cmd, " -o "); strcat(cmd, modulechars); + free(pathchars); + free(modulechars); + // Call clm return system(cmd); } @@ -111,5 +114,6 @@ void run(CleanString executable) { // <module> -nt strcat(execchars, " -nt"); system(execchars); + free(execchars); } |