summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/rdma/src/rdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-transport/rdma/src/rdma.c')
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 3d4dfe3620f..facc92358a8 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -196,9 +196,7 @@ gf_rdma_new_post (gf_rdma_device_t *device, int32_t len,
ret = 0;
out:
if (ret != 0) {
- if (post->buf != NULL) {
- free (post->buf);
- }
+ free (post->buf);
GF_FREE (post);
post = NULL;
@@ -2931,9 +2929,7 @@ out:
*readch = NULL;
}
- if (write_ary != NULL) {
- GF_FREE (write_ary);
- }
+ GF_FREE (write_ary);
}
return ret;