From 84c13bde15a1594b8cc6d20e5a917cf151af3a08 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Fri, 10 May 2019 02:21:02 +0200 Subject: [PATCH] =?UTF-8?q?.oO(=20is=20this=20even=20needed=3F=20but=20it'?= =?UTF-8?q?s=20correct,=20so=E2=80=A6=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/basic_api.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/basic_api.cc b/src/basic_api.cc index d9e3e99..af7575e 100644 --- a/src/basic_api.cc +++ b/src/basic_api.cc @@ -106,8 +106,10 @@ namespace pEp { auto result = boost::python::list(); for (::identity_list *il = private_keys; il && il->ident; il=il->next) { ::pEp_identity *ident = ::identity_dup(il->ident); - if (!ident) + if (!ident) { + free_identity_list(private_keys); throw bad_alloc(); + } result.append(Identity(ident)); }