Commit
956cbd24e645609c94fbc836840ce0f87ba3ce79 created a memory leak
if the KCM_OP_GET_DEFAULT_CACHE call fails inside kcm_ptcursor_new
after the KCM_OP_GET_CACHE_UUID_LIST call succeeds. Fix it.
ticket: 8002
krb5_error_code ret;
struct kcmreq req = EMPTY_KCMREQ;
struct kcmio *io = NULL;
- struct uuid_list *uuids;
+ struct uuid_list *uuids = NULL;
const char *defname, *primary;
*cursor_out = NULL;
goto cleanup;
ret = make_ptcursor(primary, uuids, io, cursor_out);
+ uuids = NULL;
io = NULL;
cleanup:
+ free_uuid_list(uuids);
kcmio_close(io);
kcmreq_free(&req);
return ret;