Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jun 2010 07:41:41 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208886 - head/sbin/geom/misc
Message-ID:  <201006070741.o577fgIT099405@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Mon Jun  7 07:41:41 2010
New Revision: 208886
URL: http://svn.freebsd.org/changeset/base/208886

Log:
  bgeom(3) does strdup of param name.
  Don't leak memory when deleting param from gctl_req.
  
  Reviewed by:	marcel
  Approved by:	mav (mentor)
  MFC after:	2 weeks

Modified:
  head/sbin/geom/misc/subr.c

Modified: head/sbin/geom/misc/subr.c
==============================================================================
--- head/sbin/geom/misc/subr.c	Mon Jun  7 06:38:12 2010	(r208885)
+++ head/sbin/geom/misc/subr.c	Mon Jun  7 07:41:41 2010	(r208886)
@@ -436,6 +436,7 @@ gctl_delete_param(struct gctl_req *req, 
 	if (i == req->narg)
 		return (ENOENT);
 
+	free(ap->name);
 	req->narg--;
 	while (i < req->narg) {
 		req->arg[i] = req->arg[i + 1];



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