ConnMan network manager
 help / color / mirror / Atom feed
From: Robert Tiemann <rtie@gmx.de>
To: connman@lists.linux.dev
Subject: [PATCH 4/4] technology: Fix memory leak.
Date: Tue, 13 Feb 2024 14:18:22 +0100	[thread overview]
Message-ID: <3aea58eb-e3ea-4abd-b6ab-b03e0bfd7f19@gmx.de> (raw)
In-Reply-To: <ef1f6257-b613-4685-bd4c-e60f35003b8f@gmx.de>


---
 src/technology.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/technology.c b/src/technology.c
index 65fb9854..270d83d0 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -479,8 +479,10 @@ static void technology_load(struct connman_technology *technology)

 	enc = g_key_file_get_string(keyfile,
 				identifier, "Tethering.Passphrase", NULL);
-	if (enc)
+	if (enc) {
 		technology->tethering_passphrase = g_strcompress(enc);
+		g_free(enc);
+	}

 	technology->tethering_freq = g_key_file_get_integer(keyfile,
 				identifier, "Tethering.Freq", NULL);
--
2.34.1

      parent reply	other threads:[~2024-02-13 13:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 13:12 [PATCH 0/4] Fixes for memory leaks and corruptions Robert Tiemann
2024-02-13 13:15 ` [PATCH 1/4] wifi: Fix use-after-free when tethering is disabled Robert Tiemann
2024-02-13 13:16 ` [PATCH 2/4] wifi: Fix memory leak Robert Tiemann
2024-02-13 13:17 ` [PATCH 3/4] wifi: Fix indentation Robert Tiemann
2024-02-13 13:18 ` Robert Tiemann [this message]

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=3aea58eb-e3ea-4abd-b6ab-b03e0bfd7f19@gmx.de \
    --to=rtie@gmx.de \
    --cc=connman@lists.linux.dev \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).