patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] ipc: unlock on failure
@ 2019-05-06 13:11 Aaron Conole
  2019-05-06 13:14 ` David Marchand
  2019-05-06 13:48 ` [dpdk-stable] [PATCH v2] " Aaron Conole
  0 siblings, 2 replies; 8+ messages in thread
From: Aaron Conole @ 2019-05-06 13:11 UTC (permalink / raw)
  To: dev; +Cc: Herakliusz Lipiec, stable, Anatoly Burakov, David Marchand

Reported by Coverity.

Fixes: a2a06860b8c4 ("ipc: fix memory leak on request failure")
Cc: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Cc: stable@dpdk.org
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/common/eal_common_proc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index d23728604..3498e6b07 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -1005,8 +1005,10 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
 		/* unlocks the mutex while waiting for response,
 		 * locks on receive
 		 */
-		if (mp_request_sync(path, req, reply, &end))
+		if (mp_request_sync(path, req, reply, &end)) {
+			pthread_mutex_unlock(&pending_requests.lock);
 			goto err;
+		}
 	}
 	pthread_mutex_unlock(&pending_requests.lock);
 	/* unlock the directory */
-- 
2.19.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-09 14:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 13:11 [dpdk-stable] [PATCH] ipc: unlock on failure Aaron Conole
2019-05-06 13:14 ` David Marchand
2019-05-06 13:22   ` Aaron Conole
2019-05-06 13:48 ` [dpdk-stable] [PATCH v2] " Aaron Conole
2019-05-06 14:02   ` David Marchand
2019-05-08 14:24   ` [dpdk-stable] [dpdk-dev] " Stojaczyk, Dariusz
2019-05-09 11:50   ` [dpdk-stable] " Burakov, Anatoly
2019-05-09 14:31     ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).