[stunnel-users] fix resource leaks and potential null dereferences in 4.54