Initialize iov and iovlen before use.

Reported by:	Lucius Windschuh <lwindschuh@googlemail.com>
This commit is contained in:
Pawel Jakub Dawidek 2009-06-02 18:30:09 +00:00
parent f93bfb23dc
commit 923f9901b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193333

View File

@ -112,6 +112,8 @@ main(int argc, char **argv)
if ((grp = getgrnam("operator")) == NULL)
errx(1, "Cannot retrieve operator gid");
iov = NULL;
iovlen = 0;
build_iovec(&iov, &iovlen, "fstype", "ffs", 4);
build_iovec(&iov, &iovlen, "from", snapname, (size_t)-1);
build_iovec(&iov, &iovlen, "fspath", stfsbuf.f_mntonname, (size_t)-1);