Imported Upstream version 0.8.0.4
[psensor-pkg-debian.git] / src / server / sysinfo.c
index b256b0d..81d793e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2012 jeanfi@gmail.com
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
 #include <glibtop/netlist.h>
 #include <glibtop/netload.h>
 
+#include "config.h"
+
+#ifdef HAVE_JSON_0
 #include <json/json.h>
+#else
+#include <json-c/json.h>
+#endif
 
 #include "sysinfo.h"
 
@@ -64,7 +70,7 @@ void sysinfo_update(struct psysinfo *info)
 void sysinfo_cleanup()
 {
        if (cpu)
-               free(cpu);
+               g_free(cpu);
 }
 
 static json_object *ram_to_json_object(const struct psysinfo *s)