|
|
d1681e |
From 5f7e699d159577a41a35085648669ea56fa80bf0 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Amar Tumballi <amarts@redhat.com>
|
|
|
d1681e |
Date: Tue, 21 Aug 2018 10:54:46 +0530
|
|
|
d1681e |
Subject: [PATCH 355/359] server-protocol: resolve memory leak
|
|
|
d1681e |
|
|
|
d1681e |
This leak got introduced as part of d15e6e444 where 'alloca()' calls
|
|
|
d1681e |
were removed in server protocol. Notice that only 'lookup()' has
|
|
|
d1681e |
two places where there is return, hence we needed free in 2 places,
|
|
|
d1681e |
not 1.
|
|
|
d1681e |
|
|
|
d1681e |
BUG: 1619416
|
|
|
d1681e |
Change-Id: I32c20a33d7a1c8862588b50455765a92095469a6
|
|
|
d1681e |
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/147574
|
|
|
d1681e |
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/protocol/server/src/server-rpc-fops.c | 3 +++
|
|
|
d1681e |
1 file changed, 3 insertions(+)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c
|
|
|
d1681e |
index a7fd3b5..35d0887 100644
|
|
|
d1681e |
--- a/xlators/protocol/server/src/server-rpc-fops.c
|
|
|
d1681e |
+++ b/xlators/protocol/server/src/server-rpc-fops.c
|
|
|
d1681e |
@@ -5871,6 +5871,9 @@ server3_3_lookup (rpcsvc_request_t *req)
|
|
|
d1681e |
ret = 0;
|
|
|
d1681e |
resolve_and_resume (frame, server_lookup_resume);
|
|
|
d1681e |
|
|
|
d1681e |
+ free (args.bname);
|
|
|
d1681e |
+ free (args.xdata.xdata_val);
|
|
|
d1681e |
+
|
|
|
d1681e |
return ret;
|
|
|
d1681e |
out:
|
|
|
d1681e |
free (args.bname);
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|