summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@redhat.com>2014-01-23 15:37:09 -0600
committerVijay Bellur <vbellur@redhat.com>2014-01-24 01:36:31 -0800
commit4ac61e7354d0c79e235e1b3be269a989ee0a83e6 (patch)
treef08d3f7415be62c8fd30d0403de04067ce15e6d2 /api
parent3340a896a15fdfbfff2777f3f53a472eb62ae2e9 (diff)
cluster/dht: goto statements may cause loop exit before memory is freed.
Memory is allocated at the top of the while loop via a call to gf_strdup(), but there are several goto calls that exit the loop, and the memory is not freed before each of those calls to goto. This fix moves the final call to GF_FREE() higher in the loop so that the memory is correctly freed. Two variables, dup_str and str_tmp1, point to portions of the allocated memory. Neither are used past the final call to GF_FREE( dup_str ). BUG: 789278 CID: 1124780 Change-Id: Id24b80cdbfd8b8855c80fffec63d7fce98cbed4a Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6771 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions