From 52d7078421844b2f88329f5be3de370b0a938636 Mon Sep 17 00:00:00 2001 From: "mmcc@openbsd.org" Date: Fri, 11 Dec 2015 04:21:11 +0000 Subject: upstream commit Remove NULL-checks before sshbuf_free(). ok djm@ Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917 --- sshbuf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sshbuf.c') diff --git a/sshbuf.c b/sshbuf.c index fd281ed9e..f52b56767 100644 --- a/sshbuf.c +++ b/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 * @@ -163,10 +163,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 -- cgit v1.2.3