Re: softraid(4): fix wrong malloc size and zero sized free calls

2019-05-13 Thread Jan Klemkow
On Mon, May 13, 2019 at 07:25:37PM -0400, Ted Unangst wrote: > Jan Klemkow wrote: > > The diff mainly add sizes to free(9) calls. But, while here fix a > > malloc(9) call with the wrong size in sr_ioctl_installboot(). > > omi->omi_som is allocated with size of struct sr_meta_crypto, but used > >

Re: softraid(4): fix wrong malloc size and zero sized free calls

2019-05-13 Thread Ted Unangst
Jan Klemkow wrote: > Hi, > > The diff mainly add sizes to free(9) calls. But, while here fix a > malloc(9) call with the wrong size in sr_ioctl_installboot(). > omi->omi_som is allocated with size of struct sr_meta_crypto, but used > as struct sr_meta_boot later. > > One free(9) with size zero

softraid(4): fix wrong malloc size and zero sized free calls

2019-05-13 Thread Jan Klemkow
Hi, The diff mainly add sizes to free(9) calls. But, while here fix a malloc(9) call with the wrong size in sr_ioctl_installboot(). omi->omi_som is allocated with size of struct sr_meta_crypto, but used as struct sr_meta_boot later. One free(9) with size zero left over in sr_discipline_free().