From bf736bebbe89618e23fc5cfb19cf049314cce03d Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 10 Oct 2020 15:03:17 +0200 Subject: tools: Fix error handling in oping write thread The function was returning under a cleanup handler, which is not allowed. We don't do anything with the return value if the write thread ends, so just stopping the thread is fine. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/tools/oping/oping_client.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c index 35f49aa2..55ef6dc5 100644 --- a/src/tools/oping/oping_client.c +++ b/src/tools/oping/oping_client.c @@ -177,10 +177,7 @@ void * writer(void * o) if (flow_write(*fdp, buf, client.size) < 0) { printf("Failed to send packet.\n"); - flow_dealloc(*fdp); - free(buf); stop = true; - return (void *) -1; } } -- cgit v1.2.3