ipc: fix resource leak in init failure
authorAnatoly Burakov <anatoly.burakov@intel.com>
Tue, 17 Apr 2018 15:46:26 +0000 (16:46 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 23 Apr 2018 20:44:25 +0000 (22:44 +0200)
Coverity issue: 272609
Fixes: f05e26051c15 ("eal: add IPC asynchronous request")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
lib/librte_eal/common/eal_common_proc.c

index ad02c00..a329708 100644 (file)
@@ -658,6 +658,7 @@ rte_mp_channel_init(void)
                RTE_LOG(ERR, EAL, "failed to create mp thead: %s\n",
                        strerror(errno));
                close(mp_fd);
+               close(dir_fd);
                mp_fd = -1;
                return -1;
        }