summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2017-08-12 02:50:05 +0000
committerjsing <>2017-08-12 02:50:05 +0000
commitb316f9f277648e3f7b8d4b8e8c5efe957a0fd85c (patch)
tree00917aae92ffb2a9da10d65b5a48a52625a4de0f
parentfe0765c6d3835b61ac892ef72d4bd13c73a01392 (diff)
downloadopenbsd-b316f9f277648e3f7b8d4b8e8c5efe957a0fd85c.tar.gz
openbsd-b316f9f277648e3f7b8d4b8e8c5efe957a0fd85c.tar.bz2
openbsd-b316f9f277648e3f7b8d4b8e8c5efe957a0fd85c.zip
Clear the child pointer in CBB_cleanup(), so that we have fewer pointers
hanging around to potentially invalid address space. Discussed with beck@ and doug@
-rw-r--r--src/lib/libssl/bs_cbb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/bs_cbb.c b/src/lib/libssl/bs_cbb.c
index dd1dc73d09..9de75fbb02 100644
--- a/src/lib/libssl/bs_cbb.c
+++ b/src/lib/libssl/bs_cbb.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bs_cbb.c,v 1.16 2017/05/07 05:03:41 jsing Exp $ */ 1/* $OpenBSD: bs_cbb.c,v 1.17 2017/08/12 02:50:05 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -87,6 +87,7 @@ CBB_cleanup(CBB *cbb)
87 free(cbb->base); 87 free(cbb->base);
88 } 88 }
89 cbb->base = NULL; 89 cbb->base = NULL;
90 cbb->child = NULL;
90} 91}
91 92
92static int 93static int