From 40399b62ec62569213948f7eb77fd39d1ff42ea1 Mon Sep 17 00:00:00 2001 From: Rafal Michalski <michalski.raf@xxxxxxxxx> Date: Fri, 8 Oct 2010 15:16:50 +0200 Subject: [PATCH] Reduction memory leaks in phonebook module Memory, pointed by pointers home_addr and work_addr, is allocated temporarily and not freed. Only duplicates of this memory (made after invoking add_address function) are freed later. --- plugins/phonebook-tracker.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c index c10491d..d0cea2e 100644 --- a/plugins/phonebook-tracker.c +++ b/plugins/phonebook-tracker.c @@ -1007,6 +1007,9 @@ add_numbers: add_address(contact, home_addr, ADDR_TYPE_HOME); add_address(contact, work_addr, ADDR_TYPE_WORK); + g_free(home_addr); + g_free(work_addr); + DBG("contact %p", contact); /* Adding contacts data to wrapper struct - this data will be used to -- 1.6.3.3