fix potential null ptr deref

Noticed by:	Coverity Prevent analysis tool
This commit is contained in:
Sam Leffler 2005-03-31 21:55:09 +00:00
parent 001ea8fba8
commit 23691262f0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144434

View File

@ -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)) {