diff options
Diffstat (limited to 'xlators/nfs/server/src/exports.c')
| -rw-r--r-- | xlators/nfs/server/src/exports.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/xlators/nfs/server/src/exports.c b/xlators/nfs/server/src/exports.c index 342ad503a6a..d7e39934851 100644 --- a/xlators/nfs/server/src/exports.c +++ b/xlators/nfs/server/src/exports.c @@ -13,8 +13,8 @@ */ #include "exports.h" -#include "hashfn.h" -#include "parse-utils.h" +#include <glusterfs/hashfn.h> +#include <glusterfs/parse-utils.h> #include "nfs-messages.h" static void @@ -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: @@ -645,6 +647,7 @@ __exp_line_opt_parse(const char *opt_str, struct export_options **exp_opts) if (!opts) { ret = -ENOMEM; parser_unset_string(options_parser); + GF_FREE(strmatch); goto out; } } @@ -675,7 +678,7 @@ __exp_line_opt_parse(const char *opt_str, struct export_options **exp_opts) _export_options_deinit(opts); goto out; } - } else + } else { /* Cannot change to gf_msg. * gf_msg not giving output to STDOUT * Bug id : BZ1215017 @@ -684,6 +687,7 @@ __exp_line_opt_parse(const char *opt_str, struct export_options **exp_opts) "Could not find any valid options for " "string: %s", strmatch); + } GF_FREE(strmatch); } @@ -1446,7 +1450,7 @@ exp_file_parse(const char *filepath, struct exports_file **expfile, GF_CHECK_ALLOC_AND_LOG(GF_EXP, file, ret, "Allocation error while " "allocating file struct", - parse_done); + free_and_done); file->filename = gf_strdup(filepath); GF_CHECK_ALLOC_AND_LOG(GF_EXP, file, ret, @@ -1468,7 +1472,9 @@ exp_file_parse(const char *filepath, struct exports_file **expfile, goto parse_done; free_and_done: - exp_file_deinit(file); + if (file) + exp_file_deinit(file); + _export_dir_deinit(expdir); parse_done: if (fp) |
