X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=blobdiff_plain;f=src%2Fserver%2Fsysinfo.c;h=9c371d5621500be52105eb82d2e53b5f997d5976;hp=b58a6076be62abe0cd060b9d4946309da69e0a73;hb=c1e20f2631a1249720e9c75d753eacfcb0f6c7b9;hpb=c03992270c83b50fa316d751caf98e0662698e98 diff --git a/src/server/sysinfo.c b/src/server/sysinfo.c index b58a607..9c371d5 100644 --- a/src/server/sysinfo.c +++ b/src/server/sysinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 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)