From: | Bean Zhang <bean.zhang@centrify.com> |
To: | "krb5-bugs@mit.edu" <krb5-bugs@mit.edu> |
Subject: | Resource leak in aname_replacer() |
Date: | Fri, 15 Jun 2018 09:12:40 +0000 |
Hi Team,
aname_replacer() in krb5-1.16.1/src/lib/krb5/os/localauth_rule.c
assigns a allocated memory by calling strdup() to pointer current,
later if runs into any "goto cleanup", the allocated momory
"current" points to will not be freed when leaves this function.
The fix is to call free(current) before "goto cleanup".
Could someone help to take a look?
Thanks,
Bean