From 2270dba5f7ea4dea791e5b1e5837e83f87199110 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 3 Sep 2018 19:42:03 +0900 Subject: [PATCH] Fixed resource leak Change-Id: Id0831b70462f5d43498d75fdda20bebe81bd9244 Signed-off-by: Hwankyu Jhun --- src/aul_launch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aul_launch.c b/src/aul_launch.c index 6fc0b4c..2b2d54f 100644 --- a/src/aul_launch.c +++ b/src/aul_launch.c @@ -274,6 +274,7 @@ static gboolean __aul_launch_handler(GIOChannel *io, GIOCondition condition, free(pkt); return G_SOURCE_CONTINUE;; } + clifd = -1; } } @@ -281,6 +282,8 @@ static gboolean __aul_launch_handler(GIOChannel *io, GIOCondition condition, b = bundle_decode(pkt->data, pkt->len); if (!b) { _E("Failed to decode the packet"); + if (clifd > 0) + close(clifd); free(pkt); return G_SOURCE_CONTINUE; } -- 2.7.4