fixed a unionfs_readdir math issue

PR:		132987
Submitted by:	Matthew Fleming <mfleming@isilon.com>
This commit is contained in:
daichi 2012-05-03 07:22:29 +00:00
parent 80e58ae973
commit 56e77af2bb

View File

@ -1642,7 +1642,7 @@ unionfs_readdir(struct vop_readdir_args *ap)
pos = newcookies;
memcpy(pos, cookies_bk, ncookies_bk * sizeof(u_long));
pos += ncookies_bk * sizeof(u_long);
pos += ncookies_bk;
memcpy(pos, *(ap->a_cookies), *(ap->a_ncookies) * sizeof(u_long));
free(cookies_bk, M_TEMP);
free(*(ap->a_cookies), M_TEMP);