diff options
author | Masamichi Hosoda <trueroad@trueroad.jp> | 2016-06-30 22:59:15 +0900 |
---|---|---|
committer | Masamichi Hosoda <trueroad@trueroad.jp> | 2016-07-08 06:45:25 +0900 |
commit | e5c35162e112e97b1e3562cb2386f76160d48339 (patch) | |
tree | 78452225e2f42984ddec39e5c1dd1aa5735913cb /lily | |
parent | 15115dd5c9b20b7fe6b1ee4f09f52a2c7c9bbe93 (diff) |
Issue 4910/1: Fix memory leak in ly:spawn ()
This commit makes free the memory allocated by g_spawn_sync ().
Diffstat (limited to 'lily')
-rw-r--r-- | lily/general-scheme.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index 02cf2fa76b..302dbd500d 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -664,6 +664,9 @@ LY_DEFINE (ly_spawn, "ly:spawn", // Print out stdout and stderr only in debug mode debug_output (string ("\n") + standard_output + standard_error, true); + g_free (standard_error); + g_free (standard_output); + for (int i = 0; i < n; i++) free (argv[i]); delete[] argv; |