Free the correct buffer in an error case.

Submitted by:	phk
This commit is contained in:
Scott Long 2009-09-08 16:09:28 +00:00
parent d6b8039292
commit 216e03861c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196983

View File

@ -2528,7 +2528,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td)
error = cdgetmode(periph, &params, AUDIO_PAGE);
if (error) {
free(&params, M_SCSICD);
free(&params.mode_buf, M_SCSICD);
cam_periph_unlock(periph);
break;
}