summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2020-05-04 23:59:24 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2020-05-04 23:59:24 +0900
commit730cd7f0bb10c5d549f58530bfc5e5c56405af50 (patch)
tree88f9b6be7dffbccd08184d2bf738c3adced355d5
parentdebb2ff1b031db94c925ab30d7fc5004161b45af (diff)
downloadconnman-730cd7f0bb10c5d549f58530bfc5e5c56405af50.tar.gz
connman-730cd7f0bb10c5d549f58530bfc5e5c56405af50.tar.bz2
connman-730cd7f0bb10c5d549f58530bfc5e5c56405af50.zip
ethernet: Fix memory leaksubmit/tizen/20200504.152605
Change-Id: Ie45da69063b59bdec02e74e37dc7d38130145803 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rw-r--r--plugins/ethernet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ethernet.c b/plugins/ethernet.c
index 4876f768..57d65424 100644
--- a/plugins/ethernet.c
+++ b/plugins/ethernet.c
@@ -221,8 +221,10 @@ static int eth_network_connect(struct connman_network *network)
g_supplicant_register_eap_callback(handle_eap_signal);
g_network = network;
- if (asprintf(&config_file, "/opt/usr/data/network/%s-eapol.conf", ifname) < 0)
+ if (asprintf(&config_file, "/opt/usr/data/network/%s-eapol.conf", ifname) < 0) {
+ g_free(ifname);
return -ENOMEM;
+ }
DBG("config_file %s", config_file);