From a4e189cf879812e66d08fd7dd3cf9544eda01fcc Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 29 Feb 2016 18:02:10 +0300 Subject: sysinfo: fix forgotten memleak --- src/sysinfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1