[commit] r13344 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua
Author: mikej Date: Fri May 15 11:11:57 2009 New Revision: 13344 Log: Wed May 13 12:14:18 CDT 2009 Pekka Pessi <first.last@nokia.com> * nua_event_server.c: free temp strings Ignore-this: 18b592f7d6ae942a48cd117f7a6f3c31 Coverity issue. Modified: freeswitch/trunk/libs/sofia-sip/.update freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c Modified: freeswitch/trunk/libs/sofia-sip/.update ============================================================================== --- freeswitch/trunk/libs/sofia-sip/.update (original) +++ freeswitch/trunk/libs/sofia-sip/.update Fri May 15 11:11:57 2009 @@ -1 +1 @@ -Fri May 15 11:10:31 CDT 2009 +Fri May 15 11:11:24 CDT 2009 Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c ============================================================================== --- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c (original) +++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c Fri May 15 11:11:57 2009 @@ -144,9 +144,13 @@ char const *ct_s = NULL; if (ev == NULL) { - char *o_type = su_strdup(home, event->o_type); - char *o_subtype = o_type ? strchr(o_type, '.') : NULL; + char *o_type, *o_subtype; + char *temp = NULL; + o_type = su_strdup(home, event->o_type); + if (o_type == NULL) + return NULL; + o_subtype = strchr(o_type, '.'); if (o_subtype) *o_subtype++ = '\0'; @@ -162,7 +166,7 @@ * types */ if (accept_s == NULL && accept) - accept_s = sip_header_as_string(home, (sip_header_t *)accept); + accept_s = temp = sip_header_as_string(home, (sip_header_t *)accept); if (accept_s == NULL && ct) accept_s = ct->c_type; if (accept_s == NULL && ct_s) @@ -173,6 +177,9 @@ o_type, o_subtype, ct ? ct->c_type : ct_s, accept_s); + + su_free(home, temp); + su_free(home, o_type); } return ev;
participants (1)
-
FreeSWITCH SVN