diff options
author | Anand Avati <avati@gluster.com> | 2010-02-22 09:23:13 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-02-22 07:13:12 -0800 |
commit | a6f0dca7cd348b2a428b2583ebcfc80425213d5c (patch) | |
tree | 64ee12a98dbf6e6d73a73184c3d78ebafeed4dbd | |
parent | abc6d28b964dc4294324a5fba479542c85abff38 (diff) |
dht: fix leak introduced in 137f94ed123b1c7c7ada541aaa599679e19888f6
dht_layout_t was getting leaked in dht_readdirp_cbk when dht_layout_get
was called but was not unref'ed
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 584 (automatically configure 'lookup-unhashed' option)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=584
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 8fcc3df35bd..14890965b50 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2172,7 +2172,10 @@ dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret < 0) goto done; - layout = dht_layout_get (this, local->fd->inode); + if (!local->layout) + local->layout = layout = dht_layout_get (this, local->fd->inode); + else + layout = local->layout; list_for_each_entry (orig_entry, (&orig_entries->list), list) { next_offset = orig_entry->d_off; |