Date: Fri, 23 Jan 2015 18:36:22 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277587 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201501231836.t0NIaMSr025650@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Fri Jan 23 18:36:21 2015 New Revision: 277587 URL: https://svnweb.freebsd.org/changeset/base/277587 Log: MFC r275812: MFV r275784: Plug a memory leak in libzfs. In zfs_iter_bookmarks, an nvlist is allocated before calling lzc_get_bookmarks, which allocates the nvlist again (and overwrites the pointer to previously allocated list). Illumos issue: 5427 memory leak in libzfs when doing rollback Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Fri Jan 23 18:33:50 2015 (r277586) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Fri Jan 23 18:36:21 2015 (r277587) @@ -24,7 +24,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>. * All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ #include <stdio.h> @@ -193,9 +193,6 @@ zfs_iter_bookmarks(zfs_handle_t *zhp, zf fnvlist_add_boolean(props, zfs_prop_to_name(ZFS_PROP_CREATETXG)); fnvlist_add_boolean(props, zfs_prop_to_name(ZFS_PROP_CREATION)); - /* Allocate an nvlist to hold the bookmarks. */ - bmarks = fnvlist_alloc(); - if ((err = lzc_get_bookmarks(zhp->zfs_name, props, &bmarks)) != 0) goto out;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501231836.t0NIaMSr025650>