diff mbox series

nfsidmap: Fix a memory leak

Message ID 20240722093209.64038-1-steved@redhat.com (mailing list archive)
State New
Headers show
Series nfsidmap: Fix a memory leak | expand

Commit Message

Steve Dickson July 22, 2024, 9:32 a.m. UTC
Reported-by: Zhang Yaqi <zhangyaqi@kylinos.cn>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/nfsidmap/umich_ldap.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Steve Dickson July 23, 2024, 4:09 p.m. UTC | #1
On 7/22/24 5:32 AM, Steve Dickson wrote:
> Reported-by: Zhang Yaqi <zhangyaqi@kylinos.cn>
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...

steved.
> ---
>   support/nfsidmap/umich_ldap.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/support/nfsidmap/umich_ldap.c b/support/nfsidmap/umich_ldap.c
> index 1aa2af49..0f88ba44 100644
> --- a/support/nfsidmap/umich_ldap.c
> +++ b/support/nfsidmap/umich_ldap.c
> @@ -200,6 +200,7 @@ static int set_krb5_ccname(const char *krb5_ccache_name)
>   		IDMAP_LOG(5, ("Failed to set creds cache for kerberos, err(%d)",
>   			      retval));
>   	}
> +	free(env);
>   #endif /* else HAVE_GSS_KRB5_CCACHE_NAME */
>   out:
>   	return retval;
diff mbox series

Patch

diff --git a/support/nfsidmap/umich_ldap.c b/support/nfsidmap/umich_ldap.c
index 1aa2af49..0f88ba44 100644
--- a/support/nfsidmap/umich_ldap.c
+++ b/support/nfsidmap/umich_ldap.c
@@ -200,6 +200,7 @@  static int set_krb5_ccname(const char *krb5_ccache_name)
 		IDMAP_LOG(5, ("Failed to set creds cache for kerberos, err(%d)",
 			      retval));
 	}
+	free(env);
 #endif /* else HAVE_GSS_KRB5_CCACHE_NAME */
 out:
 	return retval;