summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
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 d3d2d913a..267e77a11 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -97,7 +97,7 @@ fetch_windows_environment(void)
97void 97void
98free_windows_environment(char **p) 98free_windows_environment(char **p)
99{ 99{
100 xfree(p); 100 free(p);
101} 101}
102 102
103#endif /* HAVE_CYGWIN */ 103#endif /* HAVE_CYGWIN */
diff --git a/openbsd-compat/getrrsetbyname-ldns.c b/openbsd-compat/getrrsetbyname-ldns.c
index 19666346b..343720f10 100644
--- a/openbsd-compat/getrrsetbyname-ldns.c
+++ b/openbsd-compat/getrrsetbyname-ldns.c
@@ -58,7 +58,6 @@
58 58
59#define malloc(x) (xmalloc(x)) 59#define malloc(x) (xmalloc(x))
60#define calloc(x, y) (xcalloc((x),(y))) 60#define calloc(x, y) (xcalloc((x),(y)))
61#define free(x) (xfree(x))
62 61
63int 62int
64getrrsetbyname(const char *hostname, unsigned int rdclass, 63getrrsetbyname(const char *hostname, unsigned int rdclass,
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index 0bdefbf6d..8da367d48 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -86,7 +86,7 @@ aix_usrinfo(struct passwd *pw)
86 fatal("Couldn't set usrinfo: %s", strerror(errno)); 86 fatal("Couldn't set usrinfo: %s", strerror(errno));
87 debug3("AIX/UsrInfo: set len %d", i); 87 debug3("AIX/UsrInfo: set len %d", i);
88 88
89 xfree(cp); 89 free(cp);
90} 90}
91 91
92# ifdef WITH_AIXAUTHENTICATE 92# ifdef WITH_AIXAUTHENTICATE
@@ -215,16 +215,14 @@ sys_auth_passwd(Authctxt *ctxt, const char *password)
215 default: /* user can't change(2) or other error (-1) */ 215 default: /* user can't change(2) or other error (-1) */
216 logit("Password can't be changed for user %s: %.100s", 216 logit("Password can't be changed for user %s: %.100s",
217 name, msg); 217 name, msg);
218 if (msg) 218 free(msg);
219 xfree(msg);
220 authsuccess = 0; 219 authsuccess = 0;
221 } 220 }
222 221
223 aix_restoreauthdb(); 222 aix_restoreauthdb();
224 } 223 }
225 224
226 if (authmsg != NULL) 225 free(authmsg);
227 xfree(authmsg);
228 226
229 return authsuccess; 227 return authsuccess;
230} 228}
@@ -269,7 +267,7 @@ sys_auth_allowed_user(struct passwd *pw, Buffer *loginmsg)
269 267
270 if (!permitted) 268 if (!permitted)
271 logit("Login restricted for %s: %.100s", pw->pw_name, msg); 269 logit("Login restricted for %s: %.100s", pw->pw_name, msg);
272 xfree(msg); 270 free(msg);
273 return permitted; 271 return permitted;
274} 272}
275 273
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index aba75387c..4637a7a3e 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
1/* $Id: port-linux.c,v 1.17 2012/03/08 23:25:18 djm Exp $ */ 1/* $Id: port-linux.c,v 1.18 2013/06/01 22:07:32 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> 4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -96,10 +96,8 @@ ssh_selinux_getctxbyname(char *pwname)
96 } 96 }
97 97
98#ifdef HAVE_GETSEUSERBYNAME 98#ifdef HAVE_GETSEUSERBYNAME
99 if (sename != NULL) 99 free(sename);
100 xfree(sename); 100 free(lvl);
101 if (lvl != NULL)
102 xfree(lvl);
103#endif 101#endif
104 102
105 return sc; 103 return sc;
@@ -217,8 +215,8 @@ ssh_selinux_change_context(const char *newname)
217 if (setcon(newctx) < 0) 215 if (setcon(newctx) < 0)
218 switchlog("%s: setcon %s from %s failed with %s", __func__, 216 switchlog("%s: setcon %s from %s failed with %s", __func__,
219 newctx, oldctx, strerror(errno)); 217 newctx, oldctx, strerror(errno));
220 xfree(oldctx); 218 free(oldctx);
221 xfree(newctx); 219 free(newctx);
222} 220}
223 221
224void 222void