gnome-system-monitor r2576 - trunk/src



Author: bdejean
Date: Mon Feb 16 18:16:39 2009
New Revision: 2576
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2576&view=rev

Log:
r2545 | bdejean | 2009-01-08 22:01:19 +0100 (jeu 08 jan 2009) | 4 lines

Fixed memory leak.
Patch by Hubert Figuiere <hfiguiere teaser fr>
Closes #566962.


Modified:
   trunk/src/util.cpp

Modified: trunk/src/util.cpp
==============================================================================
--- trunk/src/util.cpp	(original)
+++ trunk/src/util.cpp	Mon Feb 16 18:16:39 2009
@@ -462,7 +462,9 @@
   {
     char* bytes = procman::format_size(rate, max_rate);
     // xgettext: rate, 10MiB/s
-    return make_string(g_strdup_printf(_("%s/s"), bytes));
+    std::string formatted_rate(make_string(g_strdup_printf(_("%s/s"), bytes)));
+    g_free(bytes);
+    return formatted_rate;
   }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]