--- projects/libstatgrab/src/libstatgrab/process_stats.c 2004/02/14 16:12:46 1.20 +++ projects/libstatgrab/src/libstatgrab/process_stats.c 2004/02/14 16:43:55 1.21 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: process_stats.c,v 1.20 2004/02/14 16:12:46 tdb Exp $ + * $Id: process_stats.c,v 1.21 2004/02/14 16:43:55 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -157,6 +157,7 @@ process_stat_t *get_process_stats(){ } if (sysctl(mib, 3, kp_stats, &size, NULL, 0) < 0) { + free(kp_stats); return NULL; } @@ -193,9 +194,9 @@ process_stat_t *get_process_stats(){ break; } } -#endif -free(kp_stats); + free(kp_stats); +#endif #ifdef CYGWIN return NULL;