Skip to contentSkip to conversation

fix udpong segfault on rconnect error

PATCH In review Jarod Wilson 2 participants 2 messages Jun 22, 2016 – Jun 23, 2016 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix udpong segfault on rconnect error

Before patch:
[root@rdma-qe-05 librdmacm (master *)]$ udpong -s 172.31.45.4
name bytes xfers total time Gb/sec usec/xfer
rconnect: No such file or directory
Segmentation fault (core dumped)

After patch:
[root@rdma-qe-05 librdmacm (master *)]$ ./examples/udpong -s 172.31.45.4
name bytes xfers total time Gb/sec usec/xfer
rconnect: No such file or directory

Simple fix, just a missing goto on error, so we don't try to do things that are already expected to fail.

---
 examples/udpong.c | 1 +
 1 file changed, 1 insertion(+)
examples/udpong.c +1 -0
index 97713a2..6affc62 100644
@@ -427,6 +427,7 @@ static int client_connect(void)
 	if (ret) {
 		perror("rconnect");
 		rs_close(rs);
+		goto out;
 	}
 
 	msg.op = msg_op_login;
Signature · 6 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1466601350-47463-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org