X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Fserver%2Fsysinfo.c;h=9c371d5621500be52105eb82d2e53b5f997d5976;hp=b256b0db459c1efc87edb5bb540bd8ea17478e13;hb=bd7036af56a4b61b2b473dccbeac5e26f78b57da;hpb=f055e7507526592d3a74c652f5f053701614c9c0 diff --git a/src/server/sysinfo.c b/src/server/sysinfo.c index b256b0d..9c371d5 100644 --- a/src/server/sysinfo.c +++ b/src/server/sysinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2016 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 @@ -21,7 +21,13 @@ #include #include +#include "config.h" + +#ifdef HAVE_JSON_0 #include +#else +#include +#endif #include "sysinfo.h" @@ -61,10 +67,10 @@ void sysinfo_update(struct psysinfo *info) info->interfaces = glibtop_get_netlist(&buf); } -void sysinfo_cleanup() +void sysinfo_cleanup(void) { if (cpu) - free(cpu); + g_free(cpu); } static json_object *ram_to_json_object(const struct psysinfo *s)