Fix memleak (reported by Mikael Berthe)
authorMyhailo Danylenko <isbear@ukrpost.net>
Fri, 06 Nov 2015 01:04:37 +0200
changeset 16 faec1018028d
parent 15 6222baf5dccc
child 17 1f884523f650
Fix memleak (reported by Mikael Berthe) Forgot to free gstring on success.
uptime.c
--- a/uptime.c	Mon Aug 20 17:13:45 2012 +0300
+++ b/uptime.c	Fri Nov 06 01:04:37 2015 +0200
@@ -85,6 +85,7 @@
 		g_string_free (line, TRUE);
 		return 0;
 	}
+	g_string_free (line, TRUE);
 	return (sec * hz) + (ssec * hz)/100;
 }