From owner-svn-src-all@FreeBSD.ORG Mon Jun 7 07:41:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99AFC106566B; Mon, 7 Jun 2010 07:41:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88DE28FC16; Mon, 7 Jun 2010 07:41:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o577fgAw099406; Mon, 7 Jun 2010 07:41:42 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o577fgIT099405; Mon, 7 Jun 2010 07:41:42 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201006070741.o577fgIT099405@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 7 Jun 2010 07:41:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208886 - head/sbin/geom/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2010 07:41:42 -0000 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];