{
bool rcode = false;
rlm_sql_handle_t *handle;
- rlm_sql_grouplist_t *head, *entry;
+ rlm_sql_grouplist_t *entry, *head = NULL;
/*
* Set, escape, and check the user attr here
* Get the list of groups this user is a member of
*/
if (sql_get_grouplist(inst, &handle, request, &head) < 0) {
+ talloc_free(head);
REDEBUG("Error getting group membership");
fr_pool_connection_release(inst->pool, request, handle);
return false;
*/
rows = sql_get_grouplist(inst, handle, request, &head);
if (rows < 0) {
+ talloc_free(head);
REDEBUG("Error retrieving group list");
-
RETURN_MODULE_FAIL;
}
+
if (rows == 0) {
RDEBUG2("User not found in any groups");
goto do_nothing;