diff options
author | Alexander Kabaev <kan@FreeBSD.org> | 2017-12-23 16:45:24 +0000 |
---|---|---|
committer | Alexander Kabaev <kan@FreeBSD.org> | 2017-12-23 16:45:24 +0000 |
commit | 92f19df431e2135b6750f26aa7a4523119e3cf89 (patch) | |
tree | 475651bf61a4172f8864377a243c8ee7df9182ec | |
parent | 5f943cca65ce394da89b66ab503accc3bad98c1e (diff) | |
download | src-92f19df431e2135b6750f26aa7a4523119e3cf89.tar.gz src-92f19df431e2135b6750f26aa7a4523119e3cf89.zip |
Do not pass NULL pointer to copyout in if_clone_list.
Sometimes caller is only interested in how many clones
are there and NULL pointer is passed for the destination
buffer. Do not pass it to copyout then.
Notes
Notes:
svn path=/head/; revision=327111
-rw-r--r-- | sys/net/if_clone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 23381267650e..8a227a527d80 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -508,7 +508,7 @@ if_clone_list(struct if_clonereq *ifcr) done: IF_CLONERS_UNLOCK(); - if (err == 0) + if (err == 0 && dst != NULL) err = copyout(outbuf, dst, buf_count*IFNAMSIZ); if (outbuf != NULL) free(outbuf, M_CLONE); |