Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 14:14:07 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r199379 - stable/8/sys/cam/scsi
Message-ID:  <200911171414.nAHEE7K3011166@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Nov 17 14:14:07 2009
New Revision: 199379
URL: http://svn.freebsd.org/changeset/base/199379

Log:
  MFC r196983:
  Free the correct buffer in an error case.
  
  Submitted by:   phk

Modified:
  stable/8/sys/cam/scsi/scsi_cd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/scsi/scsi_cd.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_cd.c	Tue Nov 17 14:13:30 2009	(r199378)
+++ stable/8/sys/cam/scsi/scsi_cd.c	Tue Nov 17 14:14:07 2009	(r199379)
@@ -2528,7 +2528,7 @@ cdioctl(struct disk *dp, u_long cmd, voi
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(&params, M_SCSICD);
+				free(&params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911171414.nAHEE7K3011166>