summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshbuf.c
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-11 04:21:11 +0000
committermmcc <mmcc@openbsd.org>2015-12-11 04:21:11 +0000
commit860b88215344f81dabc73da83bc869b3f57892bd (patch)
treebe24ac75ef63ad3efc85a90e3e49e6ce02b21231 /usr.bin/ssh/sshbuf.c
parentinclude remote port number in a few more messages; makes tying log (diff)
downloadwireguard-openbsd-860b88215344f81dabc73da83bc869b3f57892bd.tar.xz
wireguard-openbsd-860b88215344f81dabc73da83bc869b3f57892bd.zip
Remove NULL-checks before sshbuf_free().
ok djm@
Diffstat (limited to 'usr.bin/ssh/sshbuf.c')
-rw-r--r--usr.bin/ssh/sshbuf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/ssh/sshbuf.c b/usr.bin/ssh/sshbuf.c
index e3f42d28908..3c49d7f127e 100644
--- a/usr.bin/ssh/sshbuf.c
+++ b/usr.bin/ssh/sshbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshbuf.c,v 1.4 2015/10/05 17:11:21 djm Exp $ */
+/* $OpenBSD: sshbuf.c,v 1.5 2015/12/11 04:21:12 mmcc Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -161,10 +161,8 @@ sshbuf_free(struct sshbuf *buf)
* If we are a child, the free our parent to decrement its reference
* count and possibly free it.
*/
- if (buf->parent != NULL) {
- sshbuf_free(buf->parent);
- buf->parent = NULL;
- }
+ sshbuf_free(buf->parent);
+ buf->parent = NULL;
/*
* If we are a parent with still-extant children, then don't free just
* yet. The last child's call to sshbuf_free should decrement our