summaryrefslogtreecommitdiff
path: root/source3/wrepld
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-23 02:52:36 +0000
committerJeremy Allison <jra@samba.org>2002-11-23 02:52:36 +0000
commitde474974ea25df7738dd175126e3f1de0df47ea6 (patch)
treeb9d41afb7e5c64a91fb5538c05e9d3358909c386 /source3/wrepld
parent46d5c060c60753b94ae97ccd48aa7a8be791feed (diff)
downloadsamba-de474974ea25df7738dd175126e3f1de0df47ea6.tar.gz
samba-de474974ea25df7738dd175126e3f1de0df47ea6.tar.bz2
samba-de474974ea25df7738dd175126e3f1de0df47ea6.zip
Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>. Jeremy. (This used to be commit 5d5762d1787db4392d2dff16024097c638b2d494)
Diffstat (limited to 'source3/wrepld')
-rw-r--r--source3/wrepld/process.c3
1 files changed, 3 insertions, 0 deletions
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)