mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-26 12:13:14 +00:00
CID 1214210: mod_ssml - resource leak when parsing SSML
This commit is contained in:
1 parent
3f56654aef
commit
bb839dfc39
1 file changed
+1
-1
@@ -604,10 +604,10 @@ static int tag_hook(void *user_data, char *name, char **atts, int type)
|
||||
{
|
||||
int result = IKS_OK;
|
||||
struct ssml_parser *parsed_data = (struct ssml_parser *)user_data;
|
||||
struct ssml_node *new_node = malloc(sizeof *new_node);
|
||||
struct ssml_node *parent_node = parsed_data->cur_node;
|
||||
|
||||
if (type == IKS_OPEN || type == IKS_SINGLE) {
|
||||
struct ssml_node *new_node = malloc(sizeof *new_node);
|
||||
if (parent_node) {
|
||||
/* inherit parent attribs */
|
||||
*new_node = *parent_node;
|
||||
|
||||
Reference in new issue
Block a user