[openssl/openssl] e6c03c: use BUF_MEM_free instead of OPENSSL_free to free B...

0 views
Skip to first unread message

Neil Horman

unread,
Sep 11, 2026, 4:57:40 PMSep 11
to openssl...@openssl.org
Branch: refs/heads/master
Home: https://github.com/openssl/openssl
Commit: e6c03cbcc9aacce38e283541016a9179bf54e965
https://github.com/openssl/openssl/commit/e6c03cbcc9aacce38e283541016a9179bf54e965
Author: Neil Horman <nho...@openssl.org>
Date: 2026-09-11 (Fri, 11 Sep 2026)

Changed paths:
M crypto/conf/conf_def.c

Log Message:
-----------
use BUF_MEM_free instead of OPENSSL_free to free BUF_MEM in str_copy

While reviewing a PR, I noticed that str_copy in conf_def.c allocates a
BUF_MEM with BUF_MEM_free, but frees it with OPENSSL_free. While this
is fine here since we take ownership of the buf mem data pointer, it was
a bit hard to parse.

Change it to follow the usual pattern of orphaning the BUF_MEM data by
setting buf->data to NULL prior to using the standard BUF_MEM_free call

Reviewed-by: Saša Nedvědický <sas...@openssl.org>
Reviewed-by: Todd Short <todd....@me.com>
Reviewed-by: Andrew Dinh <and...@openssl.org>
MergeDate: Fri Sep 11 20:55:00 2026
(Merged from https://github.com/openssl/openssl/pull/32774)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
Reply all
Reply to author
Forward
0 new messages