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] Pygrub: stop the FS identification code f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Pygrub: stop the FS identification code from leaking open fds.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Sep 2006 16:30:14 +0000
Delivery-date: Thu, 21 Sep 2006 09:30:55 -0700
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 587735fb18abf1dd1b7dcb621810e3eaf129b1d7
# Parent  93135bbb5344fda74ab5596a84e4a5c9715ae674
Pygrub: stop the FS identification code from leaking open fds.
Signed-off-by: Tim Deegan <tim.deegn@xxxxxxxxxxxxx>
---
 tools/pygrub/src/fsys/ext2/__init__.py   |    2 +-
 tools/pygrub/src/fsys/reiser/__init__.py |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff -r 93135bbb5344 -r 587735fb18ab tools/pygrub/src/fsys/ext2/__init__.py
--- a/tools/pygrub/src/fsys/ext2/__init__.py    Thu Sep 21 11:33:38 2006 +0100
+++ b/tools/pygrub/src/fsys/ext2/__init__.py    Thu Sep 21 14:55:02 2006 +0100
@@ -23,7 +23,7 @@ class Ext2FileSystemType(FileSystemType)
         fd = os.open(fn, os.O_RDONLY)
         os.lseek(fd, offset, 0)
         buf = os.read(fd, 2048)
-        
+        os.close(fd)        
         if len(buf) > 1082 and \
                struct.unpack("<H", buf[1080:1082]) == (0xef53,):
             return True
diff -r 93135bbb5344 -r 587735fb18ab tools/pygrub/src/fsys/reiser/__init__.py
--- a/tools/pygrub/src/fsys/reiser/__init__.py  Thu Sep 21 11:33:38 2006 +0100
+++ b/tools/pygrub/src/fsys/reiser/__init__.py  Thu Sep 21 14:55:02 2006 +0100
@@ -26,6 +26,7 @@ class ReiserFileSystemType(FileSystemTyp
         fd = os.open(fn, os.O_RDONLY)
         os.lseek(fd, 0x10000, 0)
         buf = os.read(fd, 0x40)
+        os.close(fd)
         if len(buf) == 0x40 and (buf[0x34:0x3B] in [FSMAGIC2, FSMAGIC3]) :
             return True
         return False

_______________________________________________
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] Pygrub: stop the FS identification code from leaking open fds., Xen patchbot-unstable <=