Fikset noen stygge malloc-feil. Fortsatt mange minnelekasjer :/

This commit is contained in:
Geir Hauge
2006-08-15 10:32:42 +00:00
parent 2191acfd78
commit 2e1453ceba
2 changed files with 6 additions and 6 deletions

@ -1,5 +1,5 @@
/*
* @(#) $Header: /tmp/cvs/mysql-admutils/common.c,v 1.6 2004-11-18 11:42:41 lkarsten Exp $
* @(#) $Header: /tmp/cvs/mysql-admutils/common.c,v 1.7 2006-08-15 10:32:42 geirha Exp $
*
* functions used by mysql-dbadm.c and mysql-useradm.c
*
@ -22,7 +22,7 @@
char *program_name;
static char *rcsheader = "@(#) " PACKAGE " " VERSION " orakel@ntnu.no $Header: /tmp/cvs/mysql-admutils/common.c,v 1.6 2004-11-18 11:42:41 lkarsten Exp $";
static char *rcsheader = "@(#) " PACKAGE " " VERSION " orakel@ntnu.no $Header: /tmp/cvs/mysql-admutils/common.c,v 1.7 2006-08-15 10:32:42 geirha Exp $";
int
@ -231,7 +231,7 @@ char **get_group_names(int *numgroups)
/* Go to next grp if it doesn't have a name */
if (g != NULL) {
grouplist = (char **) realloc(grouplist, (real_nr_groups+1) * sizeof(char *));
grouplist = (char **) realloc(grouplist, (real_nr_groups+2) * sizeof(char *));
grouplist[real_nr_groups] = strdup(g->gr_name);
real_nr_groups++;
} else {