Mercurial > pidgin.yaz
diff libpurple/protocols/msn/slp.c @ 20990:bc731b26335c
Leak fixes.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 19 Oct 2007 01:28:55 +0000 |
parents | a9022965162b |
children | 7d3b2c023ad8 b65997110933 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c Thu Oct 18 23:51:10 2007 +0000 +++ b/libpurple/protocols/msn/slp.c Fri Oct 19 01:28:55 2007 +0000 @@ -505,6 +505,9 @@ int port; nonce = get_token(content, "Nonce: {", "}\r\n"); + if (ip_addrs == NULL) + return; + ip_addrs = get_token(content, "IPv4Internal-Addrs: ", "\r\n"); temp = get_token(content, "IPv4Internal-Port: ", "\r\n"); @@ -514,9 +517,6 @@ port = -1; g_free(temp); - if (ip_addrs == NULL) - return; - if (port > 0) got_transresp(slpcall, nonce, ip_addrs, port); @@ -598,6 +598,9 @@ int port; nonce = get_token(content, "Nonce: {", "}\r\n"); + if (ip_addrs == NULL) + return; + ip_addrs = get_token(content, "IPv4Internal-Addrs: ", "\r\n"); temp = get_token(content, "IPv4Internal-Port: ", "\r\n"); @@ -607,9 +610,6 @@ port = -1; g_free(temp); - if (ip_addrs == NULL) - return; - if (port > 0) got_transresp(slpcall, nonce, ip_addrs, port);