aboutsummaryrefslogtreecommitdiff
path: root/src/ss/os.c
diff options
context:
space:
mode:
authorOndrej Čerman2020-01-31 22:10:34 +0100
committerOndrej Čerman2020-01-31 22:10:34 +0100
commit523cdc315bbc9486fd8cb0c9cc557e0e0879dbe1 (patch)
tree6e7922e78ee8602885ce5e7ea0f9d159f8b0227e /src/ss/os.c
parentb079f2f20b2f743b6df79bbd2473d74b3cffd935 (diff)
Fixed mem leakv1.3.1
Version 1.3.1
Diffstat (limited to 'src/ss/os.c')
-rw-r--r--src/ss/os.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ss/os.c b/src/ss/os.c
index a491c02..a3ee7a6 100644
--- a/src/ss/os.c
+++ b/src/ss/os.c
@@ -17,10 +17,15 @@ gfloat *core_freq_max;
static gdouble get_frequency(guint coreid) {
gchar *data;
+ gdouble freq;
+
if (!g_file_get_contents(frq_files[coreid], &data, NULL, NULL))
return 0.0;
- return atoi(data) / 1000000.0;
+ freq = atoi(data) / 1000000.0;
+ g_free(data);
+
+ return freq;
}
gboolean os_init(void) {