mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
Minor code cleanup. calling va_start without calling va_end doesn't leak does it? Either way, it's fixed now.
This commit is contained in:
+3
-1
@@ -1766,8 +1766,10 @@ SWITCH_DECLARE(switch_xml_t) switch_event_xmlize(switch_event_t *event, const ch
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
data = (char *) malloc(2048);
|
||||
if (!data)
|
||||
if (!data) {
|
||||
va_end(ap);
|
||||
return NULL;
|
||||
}
|
||||
ret = vsnprintf(data, 2048, fmt, ap);
|
||||
#endif
|
||||
va_end(ap);
|
||||
|
||||
Reference in New Issue
Block a user