[mod_verto] Fix memory leak by correctly freeing regex
For mod_verto regex was never freed and was actually leaking memory. Correctly free the compiled regex to fix the memory leak. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
e490fe6d7d
commit
12b47fe7f9
|
@ -1893,10 +1893,12 @@ authed:
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||||
"%d request [%s] matched expr [%s]\n", proceed, request->uri, expression);
|
"%d request [%s] matched expr [%s]\n", proceed, request->uri, expression);
|
||||||
request->uri = rule->value;
|
request->uri = rule->value;
|
||||||
|
switch_regex_safe_free(re);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
rule = rule->next;
|
rule = rule->next;
|
||||||
|
switch_regex_safe_free(re);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue