URL:
https://github.com/SSSD/sssd/pull/395
Author: jhrozek
Title: #395: KCM: Three trivial fixes
Action: opened
PR body:
"""
I've been working on the KCM responder lately and found some minor issues
that can be merged right away.
1) KCM: Add some forgotten NULL checks
Several memory allocations across the KCM codebase did not check their
result for NULL. This patch fixes that.
2) KCM: Use the right memory context
Inside the tevent request, we should use 'state' as the intermediate memory
context and steal the result up to 'mem_ctx' on success.
'mem_ctx' itself should only be used to create the tevent_req as the first
thing during the request creation.
However, this bug is not very severe as the mem_ctx was always the KCM
operation memory context, so the memory was freed when the operation
terminated.
3) KCM: Do not leak newly created ccache in case the name is malformed
This is not a big deal as the mem_ctx parameter of the operation is
typically just a short-lived operation context. Nonetheless, it is best
practice to not rely on how the memory context is set up in utility
functions.
"""
To pull the PR as Git branch:
git remote add ghsssd
https://github.com/SSSD/sssd
git fetch ghsssd pull/395/head:pr395
git checkout pr395