summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-02-29 18:02:10 +0300
committermonsta <[email protected]>2016-02-29 18:12:21 +0300
commitf3dc995d287e4a62b7242bf467f3a9a5742c3641 (patch)
tree620b8576d3b7d5ecaae7f33cd37d7109f834d2bd
parentb697b585d3e492014682f4d176b0dd2bbb05bef7 (diff)
downloadmate-system-monitor-f3dc995d287e4a62b7242bf467f3a9a5742c3641.tar.bz2
mate-system-monitor-f3dc995d287e4a62b7242bf467f3a9a5742c3641.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 73de819..1e4e8ff 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