summaryrefslogtreecommitdiff
path: root/uidswap.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-02 08:07:31 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-06-02 08:07:31 +1000
commitf60845fde29cead9d75e812db1c04916b4c58ffd (patch)
treea69fe76f6dd73057e46625867d1b4282e8a5a040 /uidswap.c
parent12f6533215c0a36ab29d11ff52a853fce45573b4 (diff)
- (dtucker) [M auth-chall.c auth-krb5.c auth-pam.c cipher-aes.c cipher-ctr.c
groupaccess.c loginrec.c monitor.c monitor_wrap.c session.c sshd.c sshlogin.c uidswap.c openbsd-compat/bsd-cygwin_util.c openbsd-compat/getrrsetbyname-ldns.c openbsd-compat/port-aix.c openbsd-compat/port-linux.c] Replace portable-specific instances of xfree with the equivalent calls to free.
Diffstat (limited to 'uidswap.c')
-rw-r--r--uidswap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/uidswap.c b/uidswap.c
index cdd7309e3..26d17f93a 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -90,8 +90,7 @@ temporarily_use_uid(struct passwd *pw)
90 if (getgroups(saved_egroupslen, saved_egroups) < 0) 90 if (getgroups(saved_egroupslen, saved_egroups) < 0)
91 fatal("getgroups: %.100s", strerror(errno)); 91 fatal("getgroups: %.100s", strerror(errno));
92 } else { /* saved_egroupslen == 0 */ 92 } else { /* saved_egroupslen == 0 */
93 if (saved_egroups != NULL) 93 free(saved_egroups);
94 xfree(saved_egroups);
95 } 94 }
96 95
97 /* set and save the user's groups */ 96 /* set and save the user's groups */
@@ -109,8 +108,7 @@ temporarily_use_uid(struct passwd *pw)
109 if (getgroups(user_groupslen, user_groups) < 0) 108 if (getgroups(user_groupslen, user_groups) < 0)
110 fatal("getgroups: %.100s", strerror(errno)); 109 fatal("getgroups: %.100s", strerror(errno));
111 } else { /* user_groupslen == 0 */ 110 } else { /* user_groupslen == 0 */
112 if (user_groups) 111 free(user_groups);
113 xfree(user_groups);
114 } 112 }
115 } 113 }
116 /* Set the effective uid to the given (unprivileged) uid. */ 114 /* Set the effective uid to the given (unprivileged) uid. */