From 1007c6844bc5e041f91dceb08f6c688aacf16306 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 1 Aug 2007 10:19:51 +0000 Subject: sgetspent: add missing free/__uc_malloc calls (spotted by Peter S. Mazinger ) --- libc/pwd_grp/pwd_grp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc/pwd_grp') diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index 77151606a..ab6f8f003 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/libc/pwd_grp/pwd_grp.c @@ -729,6 +729,8 @@ struct spwd *sgetspent(const char *string) } *sp; struct spwd *result; + free(sp); + sp = __uc_malloc(sizeof(*sp)); sgetspent_r(string, &sp->spwd, sp->line_buff, sizeof(sp->line_buff), &result); return result; } -- cgit v1.2.3