svn commit: r209385 - stable/8/sbin/geom/misc

Andrey V. Elsukov ae at FreeBSD.org
Mon Jun 21 05:42:36 UTC 2010


Author: ae
Date: Mon Jun 21 05:42:36 2010
New Revision: 209385
URL: http://svn.freebsd.org/changeset/base/209385

Log:
  MFC r208886:
  
  libgeom(3) does strdup of param name.
  Don't leak memory when deleting param from gctl_req.
  
  Approved by:	mav (mentor)

Modified:
  stable/8/sbin/geom/misc/subr.c
Directory Properties:
  stable/8/sbin/geom/   (props changed)
  stable/8/sbin/geom/class/part/   (props changed)
  stable/8/sbin/geom/class/stripe/   (props changed)

Modified: stable/8/sbin/geom/misc/subr.c
==============================================================================
--- stable/8/sbin/geom/misc/subr.c	Mon Jun 21 05:42:21 2010	(r209384)
+++ stable/8/sbin/geom/misc/subr.c	Mon Jun 21 05:42:36 2010	(r209385)
@@ -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];


More information about the svn-src-all mailing list