Fix resource leak, variables cp, xopts and nopt going out of scope.

Reported by:	Coverity
CID:		1305412
Sponsored by:	iXsystems Inc.
This commit is contained in:
Marcelo Araujo 2018-11-02 07:57:28 +00:00
parent f5a7a8cd67
commit ea2c655dd9

View File

@ -573,6 +573,9 @@ blockif_open(const char *optstr, const char *ident)
err:
if (fd >= 0)
close(fd);
free(cp);
free(xopts);
free(nopt);
return (NULL);
}