Skip to contentSkip to conversation

examples/ip_pipeline: fix resource leak for thread

PATCH In review Jasvinder Singh 2 participants 2 messages Apr 27, 2020 – May 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ip_pipeline: fix resource leak for thread

For sending request messages to data plane threads, the caller invokes thread_msg_send_recv() function which never returns null response. Thus, removed redundant check on the returned response.

Coverity Issues: 357773, 357723

Fixes 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands")
---
 examples/ip_pipeline/thread.c | 4 ----
 1 file changed, 4 deletions(-)
examples/ip_pipeline/thread.c +0 -4
index 272fbbeed..fda4d3c2a 100644
@@ -325,8 +325,6 @@ thread_pipeline_enable(uint32_t thread_id,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -412,8 +410,6 @@ thread_pipeline_disable(uint32_t thread_id,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
Signature · 1 line
2.21.1
#1 lore raw

27/04/2020 18:56, Jasvinder Singh:

Quoted 10 lines

For sending request messages to data plane threads, the caller invokes thread_msg_send_recv() function which never returns null response. Thus, removed redundant check on the returned response.

Coverity Issues: 357773, 357723

Fixes 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands")

This patch has been forgotten.

Applied and squashed with "fix resource leak for pipeline".