remove leak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12068 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
17f9ced469
commit
e858a1d850
|
@ -270,7 +270,9 @@ SWITCH_DECLARE(const char *)Event::serialize(const char *format)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (switch_event_serialize(event, &serialized_string, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_serialize(event, &serialized_string, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) {
|
||||||
serialized_string = switch_mprintf("'%s'", serialized_string);
|
char *new_serialized_string = switch_mprintf("'%s'", serialized_string);
|
||||||
|
free(serialized_string);
|
||||||
|
serialized_string = new_serialized_string;
|
||||||
return serialized_string;
|
return serialized_string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue