From: Masamichi Hosoda Date: Thu, 30 Jun 2016 13:59:15 +0000 (+0900) Subject: Issue 4910/1: Fix memory leak in ly:spawn () X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e5c35162e112e97b1e3562cb2386f76160d48339;p=lilypond.git Issue 4910/1: Fix memory leak in ly:spawn () This commit makes free the memory allocated by g_spawn_sync (). --- 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;