]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
fabrics: avoid segfault if transport type is omitted
authorMartin George <marting@netapp.com>
Mon, 18 Apr 2022 07:22:37 +0000 (12:52 +0530)
committerMartin George <marting@netapp.com>
Mon, 18 Apr 2022 07:28:54 +0000 (12:58 +0530)
commit565c8d2da873e143b343bdf42ea71e9aa9636efa
treec5452a02af290bf28208535997e7989a331d5d6b
parent826511cbf74cf66719621991760f01ffc7eb334f
fabrics: avoid segfault if transport type is omitted

A nvme discover or connect-all would currently end up in a
segfault if the transport type is omitted as shown below:

nvme discover -w 192.168.1.114 -a 192.168.1.160
Segmentation fault (core dumped)

Avoid this segfault by checking if the transport type is
available before proceeding in get_default_trsvcid().

Signed-off-by: Martin George <marting@netapp.com>
fabrics.c