MINOR: proxy: always properly reset the just freed default instance pointers
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 09:48:53 +0000 (10:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 15:23:46 +0000 (16:23 +0100)
commit818ec78af8814174b4b055856133c57330917a7a
treee915aae6bd7ff81c42c95770837254ffaccd8812
parenta3320a0509f16beda2c93a98cf49d45a5d9bda88
MINOR: proxy: always properly reset the just freed default instance pointers

In proxy_free_defaults(); none of the free() calls was followed by a
pointer reset. Not only it's hard to figure if one of them is duplicated,
but this code started to call other functions which might or might not
rely on such just freed pointers. Let's reset them as they should be to
make sure there will never be any case of use-after-free. The 3 functions
called there were inspected and are all unaffected by this so this remains
safe to do right now.
src/proxy.c