aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2018-03-08 15:28:13 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2018-03-08 15:28:13 +0000
commitf3365f07a309bb47249475816a3e6b5faf7f4bec (patch)
tree96d774bd5d67d7bac6ac71740b18bf4962d7f791 /usr.sbin
parente808190a59fe2501bea01192584e2981e62083bd (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mlx5tool/mlx5tool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/mlx5tool/mlx5tool.c b/usr.sbin/mlx5tool/mlx5tool.c
index d52534f77d10..0193837032a5 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;