]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/eal_common_proc.c
ipc: fix resource leak in init failure
[dpdk.git] / lib / librte_eal / common / eal_common_proc.c
index 74bc30017b44767e8bc2637d4ab548d5971d67d6..a3297080e82126d23b34bb1b9613825e68105efb 100644 (file)
@@ -525,6 +525,7 @@ async_reply_handle(void *arg __rte_unused)
                wait_for_async_messages();
 
                if (gettimeofday(&now, NULL) < 0) {
+                       pthread_mutex_unlock(&pending_requests.lock);
                        RTE_LOG(ERR, EAL, "Cannot get current time\n");
                        break;
                }
@@ -657,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;
        }