remove leak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12068 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-02-16 20:25:05 +00:00
parent 17f9ced469
commit e858a1d850
1 changed files with 3 additions and 1 deletions

View File

@ -270,7 +270,9 @@ SWITCH_DECLARE(const char *)Event::serialize(const char *format)
}
} else {
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;
}
}