log_failure (state, "Favorite identity %s not found in favorite identities list",
fids[i].identity);
}
+
+ kim_identity_free (&identity);
}
if (!err && i != count) {
log_failure (state, "Favorite identity %s not found in favorite identities list",
fids[i].identity);
}
+
+ kim_identity_free (&identity);
}
if (!err && i != count) {
if (!err) {
kim_preferences prefs = NULL;
kim_count count, j;
- kim_string string;
err = kim_preferences_create (&prefs);
fail_if_error (state, "kim_preferences_create", err,
for (j = 0; j < count; j++) {
kim_identity compare_identity = NULL;
kim_options compare_options = NULL;
+ kim_string string = NULL;
err = kim_preferences_get_favorite_identity_at_index (prefs, 0,
&compare_identity,
"while getting favorite identity %d", (int) j);
if (!err) {
- kim_identity_get_display_string(compare_identity, &string);
+ err = kim_identity_get_display_string(compare_identity, &string);
+ fail_if_error (state, "kim_identity_get_display_string", err,
+ "while getting the display string for identity %d", (int) j);
+ }
+
+ if (!err) {
err = kim_preferences_remove_favorite_identity(prefs, compare_identity);
fail_if_error (state, "kim_preferences_remove_favorite_identity", err,
"while removing favorite identity %d \"%s\"", (int) j, string);
display_string);
}
+ kim_string_free (&string);
kim_identity_free (&compare_identity);
kim_options_free (&compare_options);
}
char* errorString;
err = KLGetErrorString (KRB5KRB_AP_ERR_BAD_INTEGRITY, &errorString);
- printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klCredentialsBadAddressErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klCacheDoesNotExistErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klPasswordMismatchErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klInsecurePasswordErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klPasswordChangeFailedErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klCantContactServerErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
err = KLGetErrorString (klCantDisplayUIErr, &errorString);
printf ("KLGetErrorString() returned %s (err = %ld)\n", errorString, err);
+ if (!err) { KLDisposeString (errorString); }
}
void TestHighLevelAPI (void)