--- projects/libstatgrab/src/libstatgrab/tools.c 2004/04/04 22:48:50 1.35 +++ projects/libstatgrab/src/libstatgrab/tools.c 2004/04/04 23:48:26 1.36 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: tools.c,v 1.35 2004/04/04 22:48:50 tdb Exp $ + * $Id: tools.c,v 1.36 2004/04/04 23:48:26 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -451,6 +451,7 @@ struct uvmexp *get_uvmexp() { int mib[2]; size_t size; static struct uvmexp *uvm = NULL; + struct uvmexp *new; mib[0] = CTL_VM; mib[1] = VM_UVMEXP; @@ -459,10 +460,11 @@ struct uvmexp *get_uvmexp() { return NULL; } - uvm = realloc(uvm, size); - if (uvm == NULL) { + new = realloc(uvm, size); + if (new == NULL) { return NULL; } + uvm = new; if (sysctl(mib, 2, uvm, &size, NULL, 0) < 0) { return NULL;