Mercurial > pidgin
changeset 25430:9c96fb57632d
Fix a null ptr deref/double free. Fixes #8336.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 06 Feb 2009 03:50:26 +0000 |
parents | 8f5a63aebdb6 |
children | bba924f14a6b |
files | libpurple/upnp.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/upnp.c Thu Feb 05 06:25:18 2009 +0000 +++ b/libpurple/upnp.c Fri Feb 06 03:50:26 2009 +0000 @@ -567,7 +567,7 @@ purple_upnp_discover_send_broadcast(UPnPDiscoveryData *dd) { gchar *sendMessage = NULL; - gsize totalSize; + size_t totalSize; gboolean sentSuccess; /* because we are sending over UDP, if there is a failure @@ -693,6 +693,7 @@ /* XXX: This should probably be async */ if(cb) cb(NULL, cb_data, NULL, 0, NULL); + return NULL; } if(port == 0 || port == -1) { port = DEFAULT_HTTP_PORT; @@ -711,11 +712,11 @@ g_free(soapMessage); gfud = purple_util_fetch_url_request_len(control_info.control_url, FALSE, NULL, TRUE, - totalSendMessage, TRUE, MAX_UPNP_DOWNLOAD, cb, cb_data); + totalSendMessage, TRUE, MAX_UPNP_DOWNLOAD, cb, cb_data); g_free(totalSendMessage); g_free(addressOfControl); - + return gfud; }