]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - rdma/res.c
rdma/sys.c: fix possible out-of-bound array access
[mirror_iproute2.git] / rdma / res.c
index 97a7b9640185e23505a93fbd695921e20f0ce9cb..6003006e98aa43ca32a481240d541f84bbf9c809 100644 (file)
@@ -161,6 +161,9 @@ void print_comm(struct rd *rd, const char *str, struct nlattr **nla_line)
 {
        char tmp[18];
 
+       if (!str)
+               return;
+
        if (rd->json_output) {
                /* Don't beatify output in JSON format */
                jsonw_string_field(rd->jw, "comm", str);