From 23691262f00a502ab508bb65cae83885dd997d7e Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Thu, 31 Mar 2005 21:55:09 +0000 Subject: fix potential null ptr deref Noticed by: Coverity Prevent analysis tool --- sys/dev/mlx/mlx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 2f2144acc759e..844a265bbac63 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -1542,7 +1542,7 @@ mlx_enquire(struct mlx_softc *sc, int command, size_t bufsize, void (* complete) out: /* we got a command, but nobody else will free it */ - if ((mc->mc_complete == NULL) && (mc != NULL)) + if ((mc != NULL) && (mc->mc_complete == NULL)) mlx_releasecmd(mc); /* we got an error, and we allocated a result */ if ((error != 0) && (result != NULL)) { -- cgit v1.3