Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee76a12
)
Branch HEAD
author
huanghua
<huanghua>
Thu, 7 Aug 2008 03:10:51 +0000
(
03:10
+0000)
committer
huanghua
<huanghua>
Thu, 7 Aug 2008 03:10:51 +0000
(
03:10
+0000)
b=16577
i=yong.fan
i=nikita.danilov
fix memory leak in osd_device_alloc()
lustre/osd/osd_handler.c
patch
|
blob
|
history
diff --git
a/lustre/osd/osd_handler.c
b/lustre/osd/osd_handler.c
index
7f1991f
..
b1df1f6
100644
(file)
--- a/
lustre/osd/osd_handler.c
+++ b/
lustre/osd/osd_handler.c
@@
-2329,10
+2329,15
@@
static struct lu_device *osd_device_alloc(const struct lu_env *env,
spin_lock_init(&o->od_osfs_lock);
o->od_osfs_age = cfs_time_shift_64(-1000);
o->od_capa_hash = init_capa_hash();
- if (o->od_capa_hash == NULL)
+ if (o->od_capa_hash == NULL) {
+ dt_device_fini(&o->od_dt_dev);
l = ERR_PTR(-ENOMEM);
+ }
} else
l = ERR_PTR(result);
+
+ if (IS_ERR(l))
+ OBD_FREE_PTR(o);
} else
l = ERR_PTR(-ENOMEM);
return l;