diff options
| author | Herman Semenoff <GermanAizek@yandex.ru> | 2026-04-08 13:09:52 +0300 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-05-01 16:27:11 +0000 |
| commit | e79f9bb22375fd72330b534e17dcd3ceace432e8 (patch) | |
| tree | 467777a1a76219fe40e7dc247039773e24771951 /methods | |
| parent | 8915e23a8f8c44bfba4dd42f77b9695120216820 (diff) | |
apt-pkg: methods: fixed many minor memleaks
Static analysis has shown that there are many minor memleaks.
Diffstat (limited to 'methods')
| -rw-r--r-- | methods/connect.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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<MethodFd> &Fd, if (auto ctx = GetContextForHost(Host, OwnerConf)) tlsFd->ssl = SSL_new(ctx); else + { + delete tlsFd; return ResultState::FATAL_ERROR; + } FdFd *fdfd = dynamic_cast<FdFd *>(Fd.get()); if (fdfd != nullptr) |
