diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-23 02:52:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-23 02:52:38 +0000 |
commit | f023d6129b7bf0d972f2bb9ecc025d316e55c8ae (patch) | |
tree | 753324d5e143411d4859ec5bb969ff98dfeba320 /source3/wrepld | |
parent | 823f8507cb209235e2efc7e19870c5d55b776d4d (diff) | |
download | samba-f023d6129b7bf0d972f2bb9ecc025d316e55c8ae.tar.gz samba-f023d6129b7bf0d972f2bb9ecc025d316e55c8ae.tar.bz2 samba-f023d6129b7bf0d972f2bb9ecc025d316e55c8ae.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 19f86f1f72aca924e9e320e20a175b5d21de45ad)
Diffstat (limited to 'source3/wrepld')
-rw-r--r-- | source3/wrepld/process.c | 3 |
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) |