kadm5: kadm5_add_passwd_quality_verifier memory leak

if krb5_get_config_strings() returns the empty string do not return
immediately.  Instead the for() loop will be skipped because the empty
string represents the end of the string list permitting
krb5_config_free_strings() to free the allocated memory.

Change-Id: Ia6fdb13f716c07b53c8b3857af4f7ab8be578882
This commit is contained in:
Jeffrey Altman
2016-11-19 08:23:06 -05:00
parent a33b6d6b78
commit 989a7c3379

View File

@@ -378,7 +378,7 @@ kadm5_add_passwd_quality_verifier(krb5_context context,
#ifdef HAVE_DLOPEN
if(check_library == NULL) {
krb5_error_code ret;
krb5_error_code ret = 0;
char **strs;
char **tmp;
@@ -386,7 +386,7 @@ kadm5_add_passwd_quality_verifier(krb5_context context,
"password_quality",
"policy_libraries",
NULL);
if(strs == NULL || *strs == NULL)
if (strs == NULL)
return 0;
for (tmp = strs; *tmp; tmp++) {