When AddResource() cannot allocate its record, it calls the resource
type's delete function before returning FALSE. For an authorization that
is SecurityDeleteAuthorization(), which removes the authorization,
releases its event clients and frees pAuth.
ProcSecurityGenerateAuthorization() then went to bailout, which removed
the authorization a second time and freed pAuth again. Return BadAlloc
directly instead.
Signed-off-by: Mason Green <mason@greenm01.net>
A frequent pattern inside request handlers looks like this:
int rc = doSomething(...);
if (rc != Success) {
return rc;
}
Making the code bit shorter & quicker to read my moving this
into a macro like this:
X_CALL_CHECK_ERR(doSomething(...));
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>