From owner-svn-src-head@FreeBSD.ORG Fri Nov 20 15:28:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAAD2106568D; Fri, 20 Nov 2009 15:28:38 +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 C96208FC25; Fri, 20 Nov 2009 15:28:38 +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 nAKFScGt047902; Fri, 20 Nov 2009 15:28:38 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAKFSco5047900; Fri, 20 Nov 2009 15:28:38 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911201528.nAKFSco5047900@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 20 Nov 2009 15:28:38 +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: r199584 - head/sbin/mount_cd9660 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 15:28:39 -0000 Author: netchild Date: Fri Nov 20 15:28:38 2009 New Revision: 199584 URL: http://svn.freebsd.org/changeset/base/199584 Log: Fix minor memory leak in a function. MFC after: 1 week Modified: head/sbin/mount_cd9660/mount_cd9660.c Modified: head/sbin/mount_cd9660/mount_cd9660.c ============================================================================== --- head/sbin/mount_cd9660/mount_cd9660.c Fri Nov 20 15:27:52 2009 (r199583) +++ head/sbin/mount_cd9660/mount_cd9660.c Fri Nov 20 15:28:38 2009 (r199584) @@ -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);