diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1995-04-22 17:28:04 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1995-04-22 17:28:04 +0000 |
| commit | 243ae8c754bde5c5b3f524d20d137bd7f3d2f76d (patch) | |
| tree | 3370b27204b458a20c423465188ec7909d25a0bd /lib/libc/gen/getpwent.c | |
| parent | 281cc46322df842558cdd0ff55ef91e650a0fce3 (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/getpwent.c')
| -rw-r--r-- | lib/libc/gen/getpwent.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 4cfe11ad5c98..46482b465fa2 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -461,22 +461,30 @@ struct _pw_cache *p, *m; struct _namelist *n; while (_plushead) { - while(_plushead->namelist) { - n = _plushead->namelist->next; - free(_plushead->namelist); - _plushead->namelist = n; - } + while(_plushead->namelist) { + n = _plushead->namelist->next; + free(_plushead->namelist->name); + free(_plushead->namelist); + _plushead->namelist = n; + } + free(_plushead->pw_entry.pw_name); + free(_plushead->pw_entry.pw_passwd); + free(_plushead->pw_entry.pw_class); + free(_plushead->pw_entry.pw_gecos); + free(_plushead->pw_entry.pw_dir); + free(_plushead->pw_entry.pw_shell); p = _plushead->next; free(_plushead); _plushead = p; } while(_minushead) { - while(_minushead->namelist) { - n = _minushead->namelist->next; - free(_minushead->namelist); - _minushead->namelist = n; - } + while(_minushead->namelist) { + n = _minushead->namelist->next; + free(_minushead->namelist->name); + free(_minushead->namelist); + _minushead->namelist = n; + } m = _minushead->next; free(_minushead); _minushead = m; |
