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:
@@ -378,7 +378,7 @@ kadm5_add_passwd_quality_verifier(krb5_context context,
|
|||||||
#ifdef HAVE_DLOPEN
|
#ifdef HAVE_DLOPEN
|
||||||
|
|
||||||
if(check_library == NULL) {
|
if(check_library == NULL) {
|
||||||
krb5_error_code ret;
|
krb5_error_code ret = 0;
|
||||||
char **strs;
|
char **strs;
|
||||||
char **tmp;
|
char **tmp;
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ kadm5_add_passwd_quality_verifier(krb5_context context,
|
|||||||
"password_quality",
|
"password_quality",
|
||||||
"policy_libraries",
|
"policy_libraries",
|
||||||
NULL);
|
NULL);
|
||||||
if(strs == NULL || *strs == NULL)
|
if (strs == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (tmp = strs; *tmp; tmp++) {
|
for (tmp = strs; *tmp; tmp++) {
|
||||||
|
Reference in New Issue
Block a user