From de474974ea25df7738dd175126e3f1de0df47ea6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Nov 2002 02:52:36 +0000 Subject: Lots of fixes for error paths where tdb_fetch() data need freeing. Found via a post from Arcady Chernyak . Jeremy. (This used to be commit 5d5762d1787db4392d2dff16024097c638b2d494) --- source3/wrepld/process.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/wrepld/process.c') diff --git a/source3/wrepld/process.c b/source3/wrepld/process.c index 56013d2e17..aca0500614 100644 --- a/source3/wrepld/process.c +++ b/source3/wrepld/process.c @@ -540,6 +540,7 @@ static void send_entry_request(GENERIC_PACKET *q, GENERIC_PACKET *r) /* Allocate the space for the ip_list. */ if((ip_list = (struct in_addr *)talloc(mem_ctx, num_ips * sizeof(struct in_addr))) == NULL) { + SAFE_FREE(dbuf.dptr); DEBUG(0,("initialise_wins: talloc fail !\n")); return; } @@ -549,6 +550,8 @@ static void send_entry_request(GENERIC_PACKET *q, GENERIC_PACKET *r) ip_list[i] = *interpret_addr2(ip_str); } + SAFE_FREE(dbuf.dptr); + /* add all entries that have 60 seconds or more to live */ if ((ttl - 60) > time_now || ttl == PERMANENT_TTL) { if(ttl != PERMANENT_TTL) -- cgit