@@ -406,8 +406,10 @@ int nfs4_init_name_mapping(char *conffile)
nfs4_methods = conf_get_list("Translation", "Method");
if (nfs4_methods) {
IDMAP_LOG(1, ("libnfsidmap: processing 'Method' list"));
- if (load_plugins(nfs4_methods, &nfs4_plugins) == -1)
+ if (load_plugins(nfs4_methods, &nfs4_plugins) == -1) {
+ conf_free_list(nfs4_methods);
return -ENOENT;
+ }
} else {
struct conf_list list;
struct conf_list_node node;
@@ -475,11 +477,15 @@ out:
if (ret) {
if (nfs4_plugins)
unload_plugins(nfs4_plugins);
- if (gss_plugins)
+ if (gss_plugins) {
unload_plugins(gss_plugins);
+ }
nfs4_plugins = gss_plugins = NULL;
}
+ if (gss_methods)
+ conf_free_list(gss_methods);
+
return ret ? -ENOENT: 0;
}
nfsidmap/libnfsidmap.c:410: leaked_storage: Variable "nfs4_methods" going out of scope leaks the storage it points to. ibnfsidmap.c:483: leaked_storage: Variable "gss_methods" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson <steved@redhat.com> --- support/nfsidmap/libnfsidmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)