]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
rdma: initialize the rd struct
authorSteve Wise <swise@opengridcomputing.com>
Thu, 29 Mar 2018 16:10:35 +0000 (09:10 -0700)
committerDavid Ahern <dsahern@gmail.com>
Sun, 1 Apr 2018 15:18:43 +0000 (08:18 -0700)
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 <swise@opengridcomputing.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
rdma/rdma.c

index ab2c96084b0399fb51090150f06ac203f53159ec..b43e5385ad0a43e4c65ff2d173cc9a49b1004f50 100644 (file)
@@ -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;