--- projects/libstatgrab/src/libstatgrab/tools.c 2005/09/24 13:29:23 1.63 +++ projects/libstatgrab/src/libstatgrab/tools.c 2006/10/09 14:09:38 1.64 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: tools.c,v 1.63 2005/09/24 13:29:23 tdb Exp $ + * $Id: tools.c,v 1.64 2006/10/09 14:09:38 tdb Exp $ */ #ifdef HAVE_CONFIG_H @@ -249,6 +249,7 @@ static int build_mapping(){ if (x>=BIG_ENOUGH){ /* We've got bigger than we thought was massive */ /* If we hit this.. Make big enough bigger */ + kstat_close(kc); return -1; } if( !strncmp(driver_list[x], device_name, BIG_ENOUGH)){ @@ -259,6 +260,7 @@ static int build_mapping(){ if(!found){ if((get_alias(device_name)) != 0){ + kstat_close(kc); return -1; } strncpy(driver_list[x], device_name, BIG_ENOUGH); @@ -266,6 +268,8 @@ static int build_mapping(){ } } } + + kstat_close(kc); return 0; }