nfs: memory leak issue reported by asan
This patch fixes Direct leaks in exports.c Leaks are happening in exp_file_parse SUMMARY: AddressSanitizer: 5120 byte(s) leaked in 20 allocation(s). SUMMARY: AddressSanitizer: 512 byte(s) leaked in 4 allocation(s). Updates: bz#1633930 Change-Id: Ib4474f8f6c65d737ed54ed35b4234410d1fd673e Signed-off-by: Harpreet Kaur <hlalwani@redhat.com>
This commit is contained in:
parent
8b3a1b19fb
commit
f50251daee
@ -203,7 +203,9 @@ _export_dir_deinit(struct export_dir *dir)
|
||||
GF_VALIDATE_OR_GOTO(GF_EXP, dir, out);
|
||||
GF_FREE(dir->dir_name);
|
||||
_exp_dict_destroy(dir->netgroups);
|
||||
dict_unref(dir->netgroups);
|
||||
_exp_dict_destroy(dir->hosts);
|
||||
dict_unref(dir->hosts);
|
||||
GF_FREE(dir);
|
||||
|
||||
out:
|
||||
@ -1469,6 +1471,7 @@ exp_file_parse(const char *filepath, struct exports_file **expfile,
|
||||
|
||||
free_and_done:
|
||||
exp_file_deinit(file);
|
||||
_export_dir_deinit(expdir);
|
||||
|
||||
parse_done:
|
||||
if (fp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user