diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-04-29 09:32:43 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-03 13:03:51 -0700 |
commit | c204e8c2713678e990b74c98f9eda8f18d714b3d (patch) | |
tree | 9126657bc3c63d071ff314e8d99fe5b4fd105754 /xlators/protocol | |
parent | a2ca310cd334bc4c3387107a0931f695efac5ba9 (diff) |
protocol: fix memory leak of lk-owner buffer in *lk() calls
Change-Id: I7fb0e1757c5e04b1a2609c9822ac79301808f671
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 768330
Reviewed-on: http://review.gluster.com/3244
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 3 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index be4322f2b3c..3289da369ce 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -2186,6 +2186,9 @@ out: if (rsp.xdata.xdata_val) free (rsp.xdata.xdata_val); + if (rsp.flock.lk_owner.lk_owner_val) + free (rsp.flock.lk_owner.lk_owner_val); + if (xdata) dict_unref (xdata); diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index 914d5160dbe..0e252b5c3d7 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -4866,6 +4866,9 @@ out: if (args.xdata.xdata_val) free (args.xdata.xdata_val); + if (args.flock.lk_owner.lk_owner_val) + free (args.flock.lk_owner.lk_owner_val); + if (op_errno) req->rpc_err = GARBAGE_ARGS; @@ -4951,6 +4954,9 @@ out: if (args.xdata.xdata_val) free (args.xdata.xdata_val); + if (args.flock.lk_owner.lk_owner_val) + free (args.flock.lk_owner.lk_owner_val); + if (op_errno) req->rpc_err = GARBAGE_ARGS; @@ -5420,6 +5426,9 @@ out: if (args.xdata.xdata_val) free (args.xdata.xdata_val); + if (args.flock.lk_owner.lk_owner_val) + free (args.flock.lk_owner.lk_owner_val); + if (op_errno) req->rpc_err = GARBAGE_ARGS; |