From: Alex Riesen <fork0@users.sourceforge.net>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, linux-hotplug-devel@lists.sourceforge.net
Subject: Re: [ANNOUNCE] udev 026 release
Date: Tue, 08 Jun 2004 09:21:54 +0000 [thread overview]
Message-ID: <20040608092154.GA28969@linux-ari.internal> (raw)
In-Reply-To: <20040607231440.GB11257@kroah.com>
In-Reply-To: <20040607231440.GB11257@kroah.com>
There is a handle leak in failure path in file_map, and the result of
file_map (or the result of the caller of the file_map) is not always
checked.
--- udev_lib.c 2004-06-08 11:08:35.812419586 +0200
+++ udev_lib.c 2004-06-08 11:10:53.203654065 +0200
@@ -124,11 +124,13 @@ int file_map(const char *filename, char
}
if (fstat(fd, &stats) < 0) {
+ close(fd);
return -1;
}
*buf = mmap(NULL, stats.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (*buf = MAP_FAILED) {
+ close(fd);
return -1;
}
*bufsize = stats.st_size;
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
WARNING: multiple messages have this Message-ID (diff)
From: Alex Riesen <fork0@users.sf.net>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, linux-hotplug-devel@lists.sourceforge.net
Subject: Re: [ANNOUNCE] udev 026 release
Date: Tue, 8 Jun 2004 11:21:54 +0200 [thread overview]
Message-ID: <20040608092154.GA28969@linux-ari.internal> (raw)
In-Reply-To: <20040607231440.GB11257@kroah.com>
There is a handle leak in failure path in file_map, and the result of
file_map (or the result of the caller of the file_map) is not always
checked.
--- udev_lib.c 2004-06-08 11:08:35.812419586 +0200
+++ udev_lib.c 2004-06-08 11:10:53.203654065 +0200
@@ -124,11 +124,13 @@ int file_map(const char *filename, char
}
if (fstat(fd, &stats) < 0) {
+ close(fd);
return -1;
}
*buf = mmap(NULL, stats.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (*buf == MAP_FAILED) {
+ close(fd);
return -1;
}
*bufsize = stats.st_size;
next prev parent reply other threads:[~2004-06-08 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 23:14 [ANNOUNCE] udev 026 release Greg KH
2004-06-07 23:14 ` Greg KH
2004-06-08 9:21 ` Alex Riesen [this message]
2004-06-08 9:21 ` Alex Riesen
2004-06-08 16:09 ` Greg KH
2004-06-08 16:09 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040608092154.GA28969@linux-ari.internal \
--to=fork0@users.sourceforge.net \
--cc=greg@kroah.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.