From e79f9bb22375fd72330b534e17dcd3ceace432e8 Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Wed, 8 Apr 2026 13:09:52 +0300 Subject: apt-pkg: methods: fixed many minor memleaks Static analysis has shown that there are many minor memleaks. --- methods/connect.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'methods/connect.cc') diff --git a/methods/connect.cc b/methods/connect.cc index 828be3f50..7e740e398 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -1011,7 +1011,10 @@ ResultState UnwrapTLS(std::string const &Host, std::unique_ptr &Fd, if (auto ctx = GetContextForHost(Host, OwnerConf)) tlsFd->ssl = SSL_new(ctx); else + { + delete tlsFd; return ResultState::FATAL_ERROR; + } FdFd *fdfd = dynamic_cast(Fd.get()); if (fdfd != nullptr) -- cgit v1.2.3-70-g09d2