Fix a possible memory leak in ct_move_scts
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 17 Nov 2023 13:47:36 +0000 (14:47 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 28 Nov 2023 18:43:02 +0000 (19:43 +0100)
commit3b61584ac74bc162724962af61f0902c74de77f1
treeb8766038c9183c135c27603346879da9f2710b27
parent612119b38839d8179f8d46bd061059ec594cb70e
Fix a possible memory leak in ct_move_scts

Instead of trying to move the doomed sct back
to the src stack, which may fail as well, simply
free the sct object, as the src list will be
deleted anyway.

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22762)

(cherry picked from commit a435d786046fabc85acdb89cbf47f154a09796e1)
ssl/ssl_lib.c