From: Tim Kourt <tim.a.kourt@linux.intel.com>
To: iwd@lists.01.org
Subject: [PATCH 1/2] eap-ttls: Address mem leak reported by coverity
Date: Tue, 15 Oct 2019 10:34:11 -0700 [thread overview]
Message-ID: <20191015173412.11810-1-tim.a.kourt@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
The issue has appeared in 6017dc573
---
src/eap-ttls.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/eap-ttls.c b/src/eap-ttls.c
index 00559cb7..619c7efa 100644
--- a/src/eap-ttls.c
+++ b/src/eap-ttls.c
@@ -1089,7 +1089,7 @@ static bool eap_ttls_settings_load(struct eap_state *eap,
struct l_settings *settings,
const char *prefix)
{
- struct phase2_method *phase2 = l_new(struct phase2_method, 1);
+ struct phase2_method *phase2;
const char *phase2_method_name;
char setting[72];
uint8_t i;
@@ -1100,6 +1100,8 @@ static bool eap_ttls_settings_load(struct eap_state *eap,
if (!phase2_method_name)
return false;
+ phase2 = l_new(struct phase2_method, 1);
+
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-", prefix);
for (i = 0; tunneled_non_eap_method_ops[i].name; i++) {
--
2.13.6
next reply other threads:[~2019-10-15 17:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 17:34 Tim Kourt [this message]
2019-10-15 17:34 ` [PATCH 2/2] client: Address dbl free reported by coverity Tim Kourt
2019-10-16 20:50 ` [PATCH 1/2] eap-ttls: Address mem leak " Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191015173412.11810-1-tim.a.kourt@linux.intel.com \
--to=tim.a.kourt@linux.intel.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox