projects
/
project
/
ubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9103ce9
)
block: fix possible NULL pointer dereference in mount_device()
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 19 Jul 2013 14:43:35 +0000
(16:43 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 19 Jul 2013 14:43:35 +0000
(16:43 +0200)
block.c
patch
|
blob
|
history
diff --git
a/block.c
b/block.c
index edfa62759efe2ead96bf3d3dd5968ad17fb42126..860a95cead30e087d2241794e15611d658b07806 100644
(file)
--- a/
block.c
+++ b/
block.c
@@
-481,11
+481,13
@@
static void check_filesystem(struct blkid_struct_probe *pr)
static int mount_device(struct blkid_struct_probe *pr, int hotplug)
{
struct mount *m;
- char *device
= basename(pr->dev)
;
+ char *device;
if (!pr)
return -1;
+ device = basename(pr->dev);
+
if (!strcmp(pr->id->name, "swap")) {
if (hotplug && !auto_swap)
return -1;