From 6763272e7f3fbe8afba948a8afb075b9cf2a5ca7 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 4 Feb 2013 14:15:24 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/4464 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/protocol/client/src/client-handshake.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 75c58afe8..ff0e162c6 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; -- cgit