summaryrefslogtreecommitdiffstats
path: root/xlators/performance/write-behind/src/write-behind.c
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2014-01-30 02:23:13 +0000
committerVijay Bellur <vbellur@redhat.com>2014-02-05 22:09:13 -0800
commite021078220c30e781ef016b42f8cee8229042bb1 (patch)
treed42560afdb7d59f2429cc92a9e854d655b3c09da /xlators/performance/write-behind/src/write-behind.c
parent60c1fa2ada704343c841b9a95d3f1cc1632fa00a (diff)
Fix for 'use after free' errors reported by coverity.
Change-Id: I941fc89b2d696c7f227330321ed4bba3ed1deac4 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6868 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/performance/write-behind/src/write-behind.c')
-rw-r--r--xlators/performance/write-behind/src/write-behind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 2be211fbf7b..b9cef1152a9 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -967,11 +967,11 @@ __wb_collapse_small_writes (wb_request_t *holder, wb_request_t *req)
ret = iobref_add (iobref, iobuf);
if (ret != 0) {
- iobuf_unref (iobuf);
- iobref_unref (iobref);
gf_log (req->wb_inode->this->name, GF_LOG_WARNING,
"cannot add iobuf (%p) into iobref (%p)",
iobuf, iobref);
+ iobuf_unref (iobuf);
+ iobref_unref (iobref);
goto out;
}