From 635f3bc0f8a05ad1280f8ab7d55181502bcad700 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Thu, 9 Feb 2012 15:57:51 -0500 Subject: Fix case where we free a definitely-NULL iobuf Change-Id: I7097386b41c8881f875c9cc3e41354df5c904dea BUG: 789118 Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.com/2732 Tested-by: Gluster Build System Reviewed-by: Harshavardhana Reviewed-by: Amar Tumballi --- rpc/rpc-lib/src/rpc-clnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-lib') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index e21aac755..631d7fcf7 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); -- cgit