From owner-svn-src-all@FreeBSD.ORG Fri Nov 27 10:55:28 2009 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 61F9B106566B; Fri, 27 Nov 2009 10:55:28 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 512D18FC13; Fri, 27 Nov 2009 10:55:28 +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 nARAtSBa017821; Fri, 27 Nov 2009 10:55:28 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nARAtSP9017819; Fri, 27 Nov 2009 10:55:28 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911271055.nARAtSP9017819@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 27 Nov 2009 10:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199861 - stable/8/sbin/mount_cd9660 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: Fri, 27 Nov 2009 10:55:28 -0000 Author: netchild Date: Fri Nov 27 10:55:28 2009 New Revision: 199861 URL: http://svn.freebsd.org/changeset/base/199861 Log: MFC r199584: Fix minor memory leak in a function. Modified: stable/8/sbin/mount_cd9660/mount_cd9660.c Directory Properties: stable/8/sbin/mount_cd9660/ (props changed) Modified: stable/8/sbin/mount_cd9660/mount_cd9660.c ============================================================================== --- stable/8/sbin/mount_cd9660/mount_cd9660.c Fri Nov 27 10:53:46 2009 (r199860) +++ stable/8/sbin/mount_cd9660/mount_cd9660.c Fri Nov 27 10:55:28 2009 (r199861) @@ -251,8 +251,10 @@ set_charset(struct iovec **iov, int *iov if ((cs_disk = malloc(ICONV_CSNMAXLEN)) == NULL) return (-1); - if ((cs_local = malloc(ICONV_CSNMAXLEN)) == NULL) + if ((cs_local = malloc(ICONV_CSNMAXLEN)) == NULL) { + free(cs_disk); return (-1); + } strncpy(cs_disk, ENCODING_UNICODE, ICONV_CSNMAXLEN); strncpy(cs_local, kiconv_quirkcs(localcs, KICONV_VENDOR_MICSFT), ICONV_CSNMAXLEN);