Fikset noen stygge malloc-feil. Fortsatt mange minnelekasjer :/
This commit is contained in:
6
common.c
6
common.c
@ -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 {
|
||||
|
Reference in New Issue
Block a user