summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-02-29 18:02:10 +0300
committermonsta <[email protected]>2016-03-21 15:41:13 +0300
commita4e189cf879812e66d08fd7dd3cf9544eda01fcc (patch)
treeb0c6b36c71121f2dd96f553849d2ac9307ceb691
parent0094fb1aa5b80bf4e91a95f42d1cdf01302dc690 (diff)
downloadmate-system-monitor-a4e189cf879812e66d08fd7dd3cf9544eda01fcc.tar.bz2
mate-system-monitor-a4e189cf879812e66d08fd7dd3cf9544eda01fcc.tar.xz
sysinfo: fix forgotten memleak
-rw-r--r--src/sysinfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 049a8ca..6c7f08f 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -112,7 +112,10 @@ namespace {
/* translators: This is the type of architecture, for example:
* "64-bit" or "32-bit" */
- return string(g_strdup_printf (_("%d-bit"), bits));
+ char* bytes = g_strdup_printf (_("%d-bit"), bits);
+ string retval(bytes);
+ g_free(bytes);
+ return retval;
}
typedef struct