diff options
| author | Ravishankar N <ravishankar@redhat.com> | 2020-09-01 11:36:42 +0530 |
|---|---|---|
| committer | Rinku Kothiya <rkothiya@redhat.com> | 2020-09-07 13:15:18 +0000 |
| commit | c0493511aaf9a4e0c77fb0934a92dd21af5b84b1 (patch) | |
| tree | 18d5c1e28aa964645c6bfdc67d392c6ff5ddfb1d /libglusterfs/src/libglusterfs.sym | |
| parent | 17c7b12cf2840239bbe905ef10b65c7de46c5425 (diff) | |
libglusterfs: fix dict leak
Problem:
gf_rev_dns_lookup_cached() allocated struct dnscache->dict if it was null
but the freeing was left to the caller.
Fix:
Moved dict allocation and freeing into corresponding init and fini
routines so that its easier for the caller to avoid such leaks.
Updates: #1000
Change-Id: I90d6a6f85ca2dd4fe0ab461177aaa9ac9c1fbcf9
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit 079f7a7d8a2bd85070c1da4dde2452ca82a1cdbb)
Diffstat (limited to 'libglusterfs/src/libglusterfs.sym')
| -rw-r--r-- | libglusterfs/src/libglusterfs.sym | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym index 26a11e36410..6247785964b 100644 --- a/libglusterfs/src/libglusterfs.sym +++ b/libglusterfs/src/libglusterfs.sym @@ -587,6 +587,7 @@ gf_dirent_free gf_dirent_orig_offset gf_dm_hashfn gf_dnscache_init +gf_dnscache_deinit gf_errno_to_error gf_error_to_errno _gf_event |
