diff options
| author | Gleb Popov <arrowd@FreeBSD.org> | 2026-09-23 15:32:55 +0000 |
|---|---|---|
| committer | Gleb Popov <arrowd@FreeBSD.org> | 2026-09-26 16:14:00 +0000 |
| commit | e8da57256d79bea8cfc25e5d838978c9fd1fc0a5 (patch) | |
| tree | 60c3f9f662ac715ed4904f2a8478bf99871d5413 | |
| parent | 3963483523a422e8644ded8d079f82949fd5a8fb (diff) | |
libutil: Make free_iovec() zero its arguments, like the manpage claims
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D59929
| -rw-r--r-- | lib/libutil/mntopts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libutil/mntopts.c b/lib/libutil/mntopts.c index 0412007ebcdf..4a019e877931 100644 --- a/lib/libutil/mntopts.c +++ b/lib/libutil/mntopts.c @@ -319,4 +319,6 @@ free_iovec(struct iovec **iov, int *iovlen) for (i = 0; i < *iovlen; i += 2) free((*iov)[i].iov_base); free(*iov); + *iov = NULL; + *iovlen = 0; } |
