Whamcloud - gitweb
LU-5540 lnet: fix crash due to NULL networks string
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index 19e1a9c..cf87d5e 100644 (file)
@@ -1762,7 +1762,6 @@ LNetNIInit(lnet_pid_t requested_pid)
        lnet_ping_info_t        *pinfo;
        lnet_handle_md_t        md_handle;
        struct list_head        net_head;
-       char                    *nets;
 
        INIT_LIST_HEAD(&net_head);
 
@@ -1777,13 +1776,11 @@ LNetNIInit(lnet_pid_t requested_pid)
                return rc;
        }
 
-       nets = lnet_get_networks();
-
        rc = lnet_prepare(requested_pid);
        if (rc != 0)
                goto failed0;
 
-       rc = lnet_parse_networks(&net_head, nets);
+       rc = lnet_parse_networks(&net_head, lnet_get_networks());
        if (rc < 0)
                goto failed1;