diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-23 02:52:36 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-23 02:52:36 +0000 |
commit | de474974ea25df7738dd175126e3f1de0df47ea6 (patch) | |
tree | b9d41afb7e5c64a91fb5538c05e9d3358909c386 /source3/libsmb | |
parent | 46d5c060c60753b94ae97ccd48aa7a8be791feed (diff) | |
download | samba-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/libsmb')
-rw-r--r-- | source3/libsmb/namecache.c | 2 | ||||
-rw-r--r-- | source3/libsmb/netlogon_unigrp.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/namecache.c b/source3/libsmb/namecache.c index 2252e8e59c..ce4cbc048c 100644 --- a/source3/libsmb/namecache.c +++ b/source3/libsmb/namecache.c @@ -196,6 +196,7 @@ BOOL namecache_fetch(const char *name, int name_type, struct in_addr **ip_list, tdb_delete(namecache_tdb, key); + SAFE_FREE(value.dptr); value = tdb_null; goto done; @@ -210,6 +211,7 @@ BOOL namecache_fetch(const char *name, int name_type, struct in_addr **ip_list, tdb_delete(namecache_tdb, key); + SAFE_FREE(value.dptr); value = tdb_null; goto done; diff --git a/source3/libsmb/netlogon_unigrp.c b/source3/libsmb/netlogon_unigrp.c index 979ff52bd3..ea9e790b7d 100644 --- a/source3/libsmb/netlogon_unigrp.c +++ b/source3/libsmb/netlogon_unigrp.c @@ -129,7 +129,8 @@ uint32* uni_group_cache_fetch(DOM_SID *domain, uint32 user_rid, /* There is no cached universal groups in netlogon_unigrp.tdb */ /* for this user. */ - if (!data.dptr) return NULL; + if (!data.dptr) + return NULL; /* Transfer data to receiver's memory context */ group_count = IVAL(&((uint32*)data.dptr)[0],0); |