mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-05 12:41:38 +00:00
fix small mem leak in util func
This commit is contained in:
parent
ac77c76818
commit
119d01f65c
@ -1062,8 +1062,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_create_brackets(char *data, char a,
|
|||||||
int var_count = 0;
|
int var_count = 0;
|
||||||
char *next;
|
char *next;
|
||||||
|
|
||||||
vdata = strdup(data);
|
vdatap = strdup(data);
|
||||||
vdatap = vdata;
|
vdata = vdatap;
|
||||||
|
|
||||||
end = switch_find_end_paren(vdata, a, b);
|
end = switch_find_end_paren(vdata, a, b);
|
||||||
|
|
||||||
@ -1081,7 +1081,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_create_brackets(char *data, char a,
|
|||||||
vdata++;
|
vdata++;
|
||||||
*end++ = '\0';
|
*end++ = '\0';
|
||||||
} else {
|
} else {
|
||||||
vdata = NULL;
|
free(vdatap);
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user