summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-02-04 14:15:24 +0530
committerAnand Avati <avati@redhat.com>2013-02-04 22:11:51 -0800
commit6763272e7f3fbe8afba948a8afb075b9cf2a5ca7 (patch)
tree7a7d08e397152635f0e7b412c03c81988753a1db
parent42a3cc275c819ee0929c371a33779a51d32eda3f (diff)
protocol/client: Avoid double free of frame
When client_submit_request fails it calls cbk. The cleanups should happen only in cbk. The code committed as part of http://review.gluster.org/4357 violates this. Also found that clnt_release_reopen_fd violates this as well. This patch fixes these issue. Change-Id: Ic02ba278724b03c65c00b686c39fd7846122618a BUG: 821056 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--xlators/protocol/client/src/client-handshake.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 75c58afe8ba..ff0e162c644 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -631,6 +631,7 @@ clnt_release_reopen_fd (xlator_t *this, clnt_fd_ctx_t *fdctx)
clnt_release_reopen_fd_cbk, NULL,
NULL, 0, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_releasedir_req);
+ return 0;
out:
if (ret) {
clnt_fd_lk_reacquire_failed (this, fdctx, conf);
@@ -1131,7 +1132,6 @@ protocol_client_reopendir (clnt_fd_ctx_t *fdctx, xlator_t *this)
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"failed to send the re-opendir request");
- goto out;
}
return 0;
@@ -1196,7 +1196,6 @@ protocol_client_reopenfile (clnt_fd_ctx_t *fdctx, xlator_t *this)
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"failed to send the re-open request");
- goto out;
}
return 0;