diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-12-11 04:21:11 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-18 14:50:48 +1100 |
commit | 52d7078421844b2f88329f5be3de370b0a938636 (patch) | |
tree | 1241462a841b14259755de181563cc83acd42109 /sshbuf.c | |
parent | a4b9e0f4e4a6980a0eb8072f76ea611cab5b77e7 (diff) |
upstream commit
Remove NULL-checks before sshbuf_free().
ok djm@
Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917
Diffstat (limited to 'sshbuf.c')
-rw-r--r-- | sshbuf.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshbuf.c,v 1.4 2015/10/05 17:11:21 djm Exp $ */ | 1 | /* $OpenBSD: sshbuf.c,v 1.5 2015/12/11 04:21:12 mmcc Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller | 3 | * Copyright (c) 2011 Damien Miller |
4 | * | 4 | * |
@@ -163,10 +163,8 @@ sshbuf_free(struct sshbuf *buf) | |||
163 | * If we are a child, the free our parent to decrement its reference | 163 | * If we are a child, the free our parent to decrement its reference |
164 | * count and possibly free it. | 164 | * count and possibly free it. |
165 | */ | 165 | */ |
166 | if (buf->parent != NULL) { | 166 | sshbuf_free(buf->parent); |
167 | sshbuf_free(buf->parent); | 167 | buf->parent = NULL; |
168 | buf->parent = NULL; | ||
169 | } | ||
170 | /* | 168 | /* |
171 | * If we are a parent with still-extant children, then don't free just | 169 | * If we are a parent with still-extant children, then don't free just |
172 | * yet. The last child's call to sshbuf_free should decrement our | 170 | * yet. The last child's call to sshbuf_free should decrement our |