Re: [EXT] Re: OpenSSL 3.2.0: dane_tlsa_add(): tlsa_free() problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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;

I fully support this idea, and am surprised that the OpenSSL maintainers have been resisting similar suggestions for quite some time.

> Or something like:
>
> #define XYZ_FREE(ptr) do { \
>  if ((ptr) != NULL) { \
>   xyz_free(ptr); \
>   (ptr) = NULL; \
>  } \
> } while (0)


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux