summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-01 10:19:51 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-01 10:19:51 +0000
commit1007c6844bc5e041f91dceb08f6c688aacf16306 (patch)
tree25b2ac977a88f479a1db705648e297b960097356
parent88483db112b15569aad4898d30a8ab7ea4deb96b (diff)
sgetspent: add missing free/__uc_malloc calls
(spotted by Peter S. Mazinger <ps.m@gmx.net>)
-rw-r--r--libc/pwd_grp/pwd_grp.c2
1 files changed, 2 insertions, 0 deletions
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;
}