summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2012-02-09 15:57:51 -0500
committerVijay Bellur <vijay@gluster.com>2012-02-10 02:59:23 -0800
commit635f3bc0f8a05ad1280f8ab7d55181502bcad700 (patch)
tree7f38848ae94e311a9aefb42052f4e8844ba484ac /rpc/rpc-lib
parent18a5e19b62ff675aaa187fe53bd5cfa6d5945ef4 (diff)
Fix case where we free a definitely-NULL iobuf
Change-Id: I7097386b41c8881f875c9cc3e41354df5c904dea BUG: 789118 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/2732 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <fharshav@redhat.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index e21aac75529..631d7fcf7e1 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1506,7 +1506,9 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog,
ret = 0;
out:
- iobuf_unref (request_iob);
+ if (request_iob) {
+ iobuf_unref (request_iob);
+ }
if (new_iobref && iobref) {
iobref_unref (iobref);