OpenSSL 3.2.0: dane_tlsa_add(): tlsa_free() problem?

Claus Assmann ca+ssl-users at esmtp.org
Sun Nov 26 07:11:25 UTC 2023


On Sat, Nov 25, 2023, Viktor Dukhovni wrote:

>     Fix freshly introduced double-free.

> -                tlsa_free(t);

BTW: maybe a more "defensive" programming style should be used:
reset the pointer after it has been freed:

	tlsa_free(t); t = NULL;

Or something like:

#define XYZ_FREE(ptr) do	{	\
		if ((ptr) != NULL) {	\
			xyz_free(ptr);	\
			(ptr) = NULL;		\
		}				\
	} while (0)


More information about the openssl-users mailing list