diff options
author | hselasky <hselasky@FreeBSD.org> | 2018-03-26 21:14:20 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2018-03-26 21:14:20 +0000 |
commit | 823dee6063e1bab32507b9b6b222741844543386 (patch) | |
tree | 1cd09f3bccc276ed43fcae7e6be1717582bffaa8 /usr.sbin | |
parent | 84881bbefc3d790548e2bd18acfc99b3b8fcd45b (diff) | |
download | FreeBSD-src-823dee6063e1bab32507b9b6b222741844543386.zip FreeBSD-src-823dee6063e1bab32507b9b6b222741844543386.tar.gz |
MFC r330654:
Check that the address is specified in mlx5tool(8).
Submitted by: kib@
Sponsored by: Mellanox Technologies
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mlx5tool/mlx5tool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/mlx5tool/mlx5tool.c b/usr.sbin/mlx5tool/mlx5tool.c index d52534f..0193837 100644 --- a/usr.sbin/mlx5tool/mlx5tool.c +++ b/usr.sbin/mlx5tool/mlx5tool.c @@ -47,6 +47,10 @@ parse_pci_addr(const char *addrstr, struct mlx5_fwdump_addr *addr) unsigned long selarr[4]; int i; + if (addrstr == NULL) { + warnx("no pci address specified"); + return (1); + } if (strncmp(addrstr, "pci", 3) == 0) { addrstr += 3; i = 0; |