summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index f977a123a7..0fa6317a2b 100644
--- a/src/lib/libcrypto/bio/bss_mem.c
+++ b/src/lib/libcrypto/bio/bss_mem.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_mem.c,v 1.26 2025/05/24 19:45:34 tb Exp $ */ 1/* $OpenBSD: bss_mem.c,v 1.27 2025/05/31 11:31:16 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -140,6 +140,7 @@ BIO_new_mem_buf(const void *buf, int buf_len)
140 return NULL; 140 return NULL;
141 141
142 bm = bio->ptr; 142 bm = bio->ptr;
143 free(bm->buf->data);
143 bm->buf->data = (void *)buf; /* Trust in the BIO_FLAGS_MEM_RDONLY flag. */ 144 bm->buf->data = (void *)buf; /* Trust in the BIO_FLAGS_MEM_RDONLY flag. */
144 bm->buf->length = buf_len; 145 bm->buf->length = buf_len;
145 bm->buf->max = buf_len; 146 bm->buf->max = buf_len;