r15996 - gnucash/trunk/src/core-utils - Free a leaked return value of g_win32_error_message.

Andreas Köhler andi5 at cvs.gnucash.org
Wed Apr 25 14:22:08 EDT 2007


Author: andi5
Date: 2007-04-25 14:22:05 -0400 (Wed, 25 Apr 2007)
New Revision: 15996
Trac: http://svn.gnucash.org/trac/changeset/15996

Modified:
   gnucash/trunk/src/core-utils/gnc-glib-utils.c
Log:
Free a leaked return value of g_win32_error_message.


Modified: gnucash/trunk/src/core-utils/gnc-glib-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-glib-utils.c	2007-04-23 02:06:19 UTC (rev 15995)
+++ gnucash/trunk/src/core-utils/gnc-glib-utils.c	2007-04-25 18:22:05 UTC (rev 15996)
@@ -287,6 +287,7 @@
     if (!TerminateProcess((HANDLE) pid, 0)) {
         gchar *msg = g_win32_error_message(GetLastError());
         g_warning("Could not kill child process: %s", msg ? msg : "(null)");
+        g_free(msg);
     }
 #else /* !G_OS_WIN32 */
     if (kill(pid, SIGKILL)) {



More information about the gnucash-changes mailing list