Skip to content

Commit

Permalink
Merge pull request #1156 from qnet-herwin/originate_coa_from_wrong_re…
Browse files Browse the repository at this point in the history
…quests

Add NULL check in originate-coa
  • Loading branch information
alandekok committed Jul 22, 2015
2 parents 1263b32 + efd828d commit f72deb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,10 @@ int map_to_request(REQUEST *request, vp_map_t const *map, radius_map_getvalue_t
*/
if (((map->lhs->tmpl_list == PAIR_LIST_COA) ||
(map->lhs->tmpl_list == PAIR_LIST_DM)) && !request->coa) {
request_alloc_coa(context);
if (!request_alloc_coa(context)) {
REDEBUG("Failed to create a CoA/Disconnect Request message");
return -2;
}
context->coa->proxy->code = (map->lhs->tmpl_list == PAIR_LIST_COA) ?
PW_CODE_COA_REQUEST :
PW_CODE_DISCONNECT_REQUEST;
Expand Down

0 comments on commit f72deb5

Please sign in to comment.