]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4910/1: Fix memory leak in ly:spawn ()
authorMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 30 Jun 2016 13:59:15 +0000 (22:59 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 7 Jul 2016 21:45:25 +0000 (06:45 +0900)
This commit makes free the memory allocated by g_spawn_sync ().

lily/general-scheme.cc

index 02cf2fa76bf3c660a473b70da7ae543b574297af..302dbd500d22552a5d070ff4db436e1822f8311b 100644 (file)
@@ -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;