From 80c0478fdf39c7b599b3f4f2ada497ab7bbd7030 Mon Sep 17 00:00:00 2001 From: Steve Wise Date: Thu, 29 Mar 2018 09:10:35 -0700 Subject: [PATCH] rdma: initialize the rd struct Initialize the rd struct so port_idx is 0 unless set otherwise. Otherwise, strict_port queries end up passing an uninitialized PORT nlattr. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: David Ahern --- rdma/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdma/rdma.c b/rdma/rdma.c index ab2c9608..b43e5385 100644 --- a/rdma/rdma.c +++ b/rdma/rdma.c @@ -135,7 +135,7 @@ int main(int argc, char **argv) bool json_output = false; bool force = false; char *filename; - struct rd rd; + struct rd rd = {}; int opt; int err;