(rmut): free utxp
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6745 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1376,7 +1376,7 @@ static int addarg(struct arg_val *argv, char *val)
|
|||||||
static void
|
static void
|
||||||
rmut(void)
|
rmut(void)
|
||||||
{
|
{
|
||||||
struct utmpx *utxp, utmpx, *non_save_utxp;
|
struct utmpx utmpx, *non_save_utxp;
|
||||||
char *clean_tty = clean_ttyname(line);
|
char *clean_tty = clean_ttyname(line);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1389,6 +1389,7 @@ rmut(void)
|
|||||||
utmpx.ut_type = LOGIN_PROCESS;
|
utmpx.ut_type = LOGIN_PROCESS;
|
||||||
non_save_utxp = getutxline(&utmpx);
|
non_save_utxp = getutxline(&utmpx);
|
||||||
if (non_save_utxp) {
|
if (non_save_utxp) {
|
||||||
|
struct utmpx *utxp;
|
||||||
char user0;
|
char user0;
|
||||||
|
|
||||||
utxp = malloc(sizeof(struct utmpx));
|
utxp = malloc(sizeof(struct utmpx));
|
||||||
@@ -1429,9 +1430,8 @@ rmut(void)
|
|||||||
close(f);
|
close(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
free (utxp);
|
||||||
}
|
}
|
||||||
endutxent();
|
endutxent();
|
||||||
} /* end of rmut */
|
} /* end of rmut */
|
||||||
|
Reference in New Issue
Block a user