summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authordtucker <dtucker>2013-06-01 22:07:31 +0000
committerdtucker <dtucker>2013-06-01 22:07:31 +0000
commitf1542066e1823de5a60fdace2257cdf0ec2f50a7 (patch)
treede0e0f1339a4b714c057362df643a1c785a9b909 /openbsd-compat
parent9015b96762cda36dd098909d314abf14acce0c99 (diff)
downloadopenssh-f1542066e1823de5a60fdace2257cdf0ec2f50a7.tar.gz
- (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 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-cygwin_util.c2
-rw-r--r--openbsd-compat/getrrsetbyname-ldns.c1
-rw-r--r--openbsd-compat/port-aix.c10
-rw-r--r--openbsd-compat/port-linux.c12
4 files changed, 10 insertions, 15 deletions
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index d3d2d913..267e77a1 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -97,7 +97,7 @@ fetch_windows_environment(void)
void
free_windows_environment(char **p)
{
- xfree(p);
+ free(p);
}
#endif /* HAVE_CYGWIN */
diff --git a/openbsd-compat/getrrsetbyname-ldns.c b/openbsd-compat/getrrsetbyname-ldns.c
index 19666346..343720f1 100644
--- a/openbsd-compat/getrrsetbyname-ldns.c
+++ b/openbsd-compat/getrrsetbyname-ldns.c
@@ -58,7 +58,6 @@
#define malloc(x) (xmalloc(x))
#define calloc(x, y) (xcalloc((x),(y)))
-#define free(x) (xfree(x))
int
getrrsetbyname(const char *hostname, unsigned int rdclass,
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index 0bdefbf6..8da367d4 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -86,7 +86,7 @@ aix_usrinfo(struct passwd *pw)
fatal("Couldn't set usrinfo: %s", strerror(errno));
debug3("AIX/UsrInfo: set len %d", i);
- xfree(cp);
+ free(cp);
}
# ifdef WITH_AIXAUTHENTICATE
@@ -215,16 +215,14 @@ sys_auth_passwd(Authctxt *ctxt, const char *password)
default: /* user can't change(2) or other error (-1) */
logit("Password can't be changed for user %s: %.100s",
name, msg);
- if (msg)
- xfree(msg);
+ free(msg);
authsuccess = 0;
}
aix_restoreauthdb();
}
- if (authmsg != NULL)
- xfree(authmsg);
+ free(authmsg);
return authsuccess;
}
@@ -269,7 +267,7 @@ sys_auth_allowed_user(struct passwd *pw, Buffer *loginmsg)
if (!permitted)
logit("Login restricted for %s: %.100s", pw->pw_name, msg);
- xfree(msg);
+ free(msg);
return permitted;
}
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index aba75387..4637a7a3 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
-/* $Id: port-linux.c,v 1.17 2012/03/08 23:25:18 djm Exp $ */
+/* $Id: port-linux.c,v 1.18 2013/06/01 22:07:32 dtucker Exp $ */
/*
* Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -96,10 +96,8 @@ ssh_selinux_getctxbyname(char *pwname)
}
#ifdef HAVE_GETSEUSERBYNAME
- if (sename != NULL)
- xfree(sename);
- if (lvl != NULL)
- xfree(lvl);
+ free(sename);
+ free(lvl);
#endif
return sc;
@@ -217,8 +215,8 @@ ssh_selinux_change_context(const char *newname)
if (setcon(newctx) < 0)
switchlog("%s: setcon %s from %s failed with %s", __func__,
newctx, oldctx, strerror(errno));
- xfree(oldctx);
- xfree(newctx);
+ free(oldctx);
+ free(newctx);
}
void