Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1aaaa82
)
libblkid: Fix potential crash if blkid cache is out of date when probing
author
Theodore Ts'o
<tytso@mit.edu>
Fri, 22 Aug 2008 16:43:14 +0000
(12:43 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Fri, 22 Aug 2008 16:43:14 +0000
(12:43 -0400)
Fix bug added in
57926c8c5566f0ef5b77db326d58aa0643cf6270
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/devname.c
patch
|
blob
|
history
diff --git
a/lib/blkid/devname.c
b/lib/blkid/devname.c
index
89b33f2
..
86fd44c
100644
(file)
--- a/
lib/blkid/devname.c
+++ b/
lib/blkid/devname.c
@@
-129,12
+129,12
@@
static void probe_one(blkid_cache cache, const char *ptname,
dev_t devno, int pri, int only_if_new)
{
blkid_dev dev = NULL;
- struct list_head *p;
+ struct list_head *p
, *pnext
;
const char **dir;
char *devname = NULL;
/* See if we already have this device number in the cache. */
- list_for_each
(p
, &cache->bic_devs) {
+ list_for_each
_safe(p, pnext
, &cache->bic_devs) {
blkid_dev tmp = list_entry(p, struct blkid_struct_dev,
bid_devs);
#ifdef HAVE_DEVMAPPER