summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-01-25 13:17:13 +0000
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-01-25 13:17:13 +0000
commitef0db63986d4bcc650fc1530ee407b45178cebea (patch)
tree580e2e4f3f7822255c2720d6acad10b057e2441c
parent39b8ffcec4136cc0e29b25d1e0bc5c37577ff4cf (diff)
salut-contact: fix leaks when setting olpc_ip4 and olpc_ip6 value
-rw-r--r--src/salut-contact.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/salut-contact.c b/src/salut-contact.c
index c0ba44b9..46b5ad53 100644
--- a/src/salut-contact.c
+++ b/src/salut-contact.c
@@ -978,10 +978,12 @@ contact_resolved_cb(SalutAvahiServiceResolver *resolver,
switch (address->proto)
{
case AVAHI_PROTO_INET:
+ g_free (self->olpc_ip4);
self->olpc_ip4 = saddr;
SET_CHANGE (SALUT_CONTACT_OLPC_PROPERTIES);
break;
case AVAHI_PROTO_INET6:
+ g_free (self->olpc_ip6);
self->olpc_ip6 = saddr;
SET_CHANGE (SALUT_CONTACT_OLPC_PROPERTIES);
break;