WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [LIBFSIMAGE] Don't leak FDs or RAM when c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LIBFSIMAGE] Don't leak FDs or RAM when closing filesystems
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Nov 2006 15:30:15 +0000
Delivery-date: Fri, 10 Nov 2006 07:30:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Node ID ac10e3047f3657942f7d3d3bbf2b982de5d17b01
# Parent  5a4517468f4f7341eef9d20d4959187a7f2f2267
[LIBFSIMAGE] Don't leak FDs or RAM when closing filesystems
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 tools/libfsimage/common/fsimage.c      |    2 ++
 tools/libfsimage/common/fsimage_grub.c |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff -r 5a4517468f4f -r ac10e3047f36 tools/libfsimage/common/fsimage.c
--- a/tools/libfsimage/common/fsimage.c Fri Nov 10 11:01:15 2006 +0000
+++ b/tools/libfsimage/common/fsimage.c Fri Nov 10 12:27:56 2006 +0000
@@ -72,6 +72,8 @@ void fsi_close_fsimage(fsi_t *fsi)
 void fsi_close_fsimage(fsi_t *fsi)
 {
        pthread_mutex_lock(&fsi_lock);
+        fsi->f_plugin->fp_ops->fpo_umount(fsi);
+        (void) close(fsi->f_fd);
        fsip_fs_free(fsi);
        pthread_mutex_unlock(&fsi_lock);
 }
diff -r 5a4517468f4f -r ac10e3047f36 tools/libfsimage/common/fsimage_grub.c
--- a/tools/libfsimage/common/fsimage_grub.c    Fri Nov 10 11:01:15 2006 +0000
+++ b/tools/libfsimage/common/fsimage_grub.c    Fri Nov 10 12:27:56 2006 +0000
@@ -193,7 +193,6 @@ static int
 static int
 fsig_umount(fsi_t *fsi)
 {
-       fsip_fs_free(fsi);
        return (0);
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LIBFSIMAGE] Don't leak FDs or RAM when closing filesystems, Xen patchbot-unstable <=