svn commit: r199861 - stable/8/sbin/mount_cd9660
Alexander Leidinger
netchild at FreeBSD.org
Fri Nov 27 10:55:28 UTC 2009
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);
More information about the svn-src-stable
mailing list