diff options
author | Tim Deegan <Tim.Deegan@xensource.com> | 2006-11-10 12:27:56 +0000 |
---|---|---|
committer | Tim Deegan <Tim.Deegan@xensource.com> | 2006-11-10 12:27:56 +0000 |
commit | 9c84d2db33251cbe5674113d8af7185d747de386 (patch) | |
tree | 0e8d56918d21bcdfd57f8d782996c10333b4cd5f /tools/libfsimage | |
parent | c18e477598a00573a84113180e80c46f6f04bb92 (diff) | |
download | xen-9c84d2db33251cbe5674113d8af7185d747de386.tar.gz xen-9c84d2db33251cbe5674113d8af7185d747de386.tar.bz2 xen-9c84d2db33251cbe5674113d8af7185d747de386.zip |
[LIBFSIMAGE] Don't leak FDs or RAM when closing filesystems
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Diffstat (limited to 'tools/libfsimage')
-rw-r--r-- | tools/libfsimage/common/fsimage.c | 2 | ||||
-rw-r--r-- | tools/libfsimage/common/fsimage_grub.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/libfsimage/common/fsimage.c b/tools/libfsimage/common/fsimage.c index f77d73b815..a326fd7644 100644 --- a/tools/libfsimage/common/fsimage.c +++ b/tools/libfsimage/common/fsimage.c @@ -72,6 +72,8 @@ fail: 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 --git a/tools/libfsimage/common/fsimage_grub.c b/tools/libfsimage/common/fsimage_grub.c index 6f3f290634..f8c3839328 100644 --- a/tools/libfsimage/common/fsimage_grub.c +++ b/tools/libfsimage/common/fsimage_grub.c @@ -193,7 +193,6 @@ fsig_mount(fsi_t *fsi, const char *path) static int fsig_umount(fsi_t *fsi) { - fsip_fs_free(fsi); return (0); } |