mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
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.
This commit is contained in:
parent
5f943cca65
commit
92f19df431
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327111
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user