Fix double fd close 08/299108/1
authorChanggyu Choi <changyu.choi@samsung.com>
Wed, 20 Sep 2023 02:23:18 +0000 (11:23 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Wed, 20 Sep 2023 02:23:18 +0000 (11:23 +0900)
Change-Id: Idb201ddb6152235b93f85126032b72f831540503
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
aul/component/component_port.cc
src/pkginfo.cc

index 01798d9..d13f994 100644 (file)
@@ -56,7 +56,7 @@ int ComponentPort::Create() {
     if (ret < 0)
       return aul_error_convert(ret);
 
-    ret = aul_sock_recv_reply_sock_fd(client.GetFd(), &fds, 1);
+    ret = aul_sock_recv_reply_sock_fd(client.RemoveFd(), &fds, 1);
     if (ret != 0)
       return aul_error_convert(ret);
   } catch (Exception& e) {
index c186e0b..307980d 100644 (file)
@@ -83,6 +83,7 @@ class ResultInfo {
   void ProcessReadEvent() {
     app_pkt_t* pkt = nullptr;
     int ret = aul_sock_recv_reply_pkt(fd_, &pkt);
+    fd_ = -1;
     if (ret < 0 || pkt == nullptr) {
       ProcessErrorEvent();
       return;