CLEANUP: ssl: make ssl_sock_free_srv_ctx() zero the pointers after free
authorWilly Tarreau <w@1wt.eu>
Fri, 26 Feb 2021 20:06:32 +0000 (21:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Jan 2022 07:48:37 +0000 (08:48 +0100)
commit51b7c93de3301d93b6a40f2e413d9b9e2c9b96ef
tree267cca4f5f2c411aeb99050c605b0c3b743afd93
parent755b7b3eeff7cf4d19fbd2e0817c6aedad1b6379
CLEANUP: ssl: make ssl_sock_free_srv_ctx() zero the pointers after free

In ssl_sock_free_srv_ctx() there are some calls to free() which are not
followed by a zeroing of the pointers. For now this function is only used
during deinit but it could be used at run time in the near future, so
better secure this.

(cherry picked from commit e709e821734c306ae482e537e3ab4960046e386c)
[wt: backported to support next patch; adjusted ctx as SNI not stored
 there in 2.4 and upper; no ha_free() in 2.3]
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c