From: Rahul Jain <rahul.jain@samsung.com>
To: "connman@lists.linux.dev" <connman@lists.linux.dev>
Cc: AMIT KUMAR JAISWAL <amit.jaiswal@samsung.com>
Subject: main: Fix a memory leak for str_list in parse_config
Date: Wed, 14 Jul 2021 14:34:11 +0530 [thread overview]
Message-ID: <20210714090411epcms5p810fc79bcbc4f7a7d48028cb1f4d3ab27@epcms5p8> (raw)
In-Reply-To: CGME20210714090411epcms5p810fc79bcbc4f7a7d48028cb1f4d3ab27@epcms5p8
commit 6e7844d37588612aa52722da6fa17468bd677b8c
Author: Rahul Jain <rahul.jain@samsung.com>
Date: Wed Jul 14 14:30:48 2021 +0530
main: Fix a memory leak for str_list in parse_config
diff --git a/src/main.c b/src/main.c
index 6480caa..25854e8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -341,6 +341,8 @@ static void parse_config(GKeyFile *config)
connman_settings.auto_connect =
parse_service_types(default_auto_connect, CONF_ARRAY_SIZE(default_auto_connect));
+ g_strfreev(str_list);
+
g_clear_error(&error);
str_list = __connman_config_get_string_list(config, "General",
next parent reply other threads:[~2021-07-14 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210714090411epcms5p810fc79bcbc4f7a7d48028cb1f4d3ab27@epcms5p8>
2021-07-14 9:04 ` Rahul Jain [this message]
2021-07-20 11:58 ` main: Fix a memory leak for str_list in parse_config Daniel Wagner
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=20210714090411epcms5p810fc79bcbc4f7a7d48028cb1f4d3ab27@epcms5p8 \
--to=rahul.jain@samsung.com \
--cc=amit.jaiswal@samsung.com \
--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 NNTP newsgroup(s).