log error
authorJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 10 Nov 2014 17:38:41 +0000 (18:38 +0100)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 10 Nov 2014 17:38:41 +0000 (18:38 +0100)
src/cfg.c

index 822abbb..d3514cc 100644 (file)
--- a/src/cfg.c
+++ b/src/cfg.c
@@ -633,8 +633,13 @@ static bool sensor_get_double(const char *sid, const char *att, double *d)
        err = NULL;
        v = g_key_file_get_double(kfile, sid, att, &err);
 
-       if (err)
+       if (err) {
+               log_err(err->message);
+
+               g_error_free(err);
+
                return false;
+       }
 
        *d = v;
        return true;