Skip to content

Commit

Permalink
app_lua: use reallocxf() to handle realloc failure
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Aug 10, 2017
1 parent 27b6801 commit 76ef8d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/app_lua/app_lua_exp.c
Expand Up @@ -644,7 +644,7 @@ static int lua_sr_tm_t_on_branch_failure(lua_State *L)
rt_name_len = strlen(BRANCH_FAILURE_ROUTE_PREFIX) + 1 + strlen(name);
if (rt_name_len > rt_name.len)
{
if ((rt_name.s = pkg_realloc(rt_name.s, rt_name_len+1)) == NULL)
if ((rt_name.s = pkg_reallocxf(rt_name.s, rt_name_len+1)) == NULL)
{
LM_ERR("No memory left in branch_failure fixup\n");
return -1;
Expand Down

0 comments on commit 76ef8d9

Please sign in to comment.