From: Steve Wise Date: Thu, 29 Mar 2018 16:10:35 +0000 (-0700) Subject: rdma: initialize the rd struct X-Git-Tag: v4.17.0~43^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80c0478fdf39c7b599b3f4f2ada497ab7bbd7030;p=thirdparty%2Fiproute2.git 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 --- diff --git a/rdma/rdma.c b/rdma/rdma.c index ab2c96084..b43e5385a 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;