Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2010 15:51:32 +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: r211457 - stable/8/sys/dev/ahci
Message-ID:  <201008181551.o7IFpW4X073314@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Aug 18 15:51:32 2010
New Revision: 211457
URL: http://svn.freebsd.org/changeset/base/211457

Log:
  MFC r208814:
  Plug memory leak to silent Coverity. Error is still not really handled.
  
  Found with:   Coverity Prevent(tm)
  CID:          4130

Modified:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (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/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Wed Aug 18 15:49:44 2010	(r211456)
+++ stable/8/sys/dev/ahci/ahci.c	Wed Aug 18 15:51:32 2010	(r211457)
@@ -2041,6 +2041,7 @@ ahci_issue_read_log(device_t dev)
 	ataio = &ccb->ataio;
 	ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT);
 	if (ataio->data_ptr == NULL) {
+		xpt_free_ccb(ccb);
 		device_printf(dev, "Unable allocate memory for READ LOG command");
 		return; /* XXX */
 	}



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