comparison libpurple/protocols/jabber/pep.c @ 17875:9edab4849ba8

Fixed a leak in the PEP code that leaked PEP nodes when the server doesn't support this XEP.
author Andreas Monitzer <pidgin@monitzer.com>
date Tue, 19 Jun 2007 23:54:52 +0000
parents 6842cc73b1b7
children d32ed28cf645
comparison
equal deleted inserted replaced
17874:906ed2836a04 17875:9edab4849ba8
106 } 106 }
107 107
108 void jabber_pep_publish(JabberStream *js, xmlnode *publish) { 108 void jabber_pep_publish(JabberStream *js, xmlnode *publish) {
109 JabberIq *iq; 109 JabberIq *iq;
110 110
111 if(js->pep != TRUE) /* ignore when there's no PEP support on the server */ 111 if(js->pep != TRUE) {
112 /* ignore when there's no PEP support on the server */
113 xmlnode_free(publish);
112 return; 114 return;
115 }
113 116
114 iq = jabber_iq_new(js, JABBER_IQ_SET); 117 iq = jabber_iq_new(js, JABBER_IQ_SET);
115 118
116 xmlnode *pubsub = xmlnode_new("pubsub"); 119 xmlnode *pubsub = xmlnode_new("pubsub");
117 xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub"); 120 xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub");