svn commit: samba r2352 - in trunk/source/nsswitch: .
vlendec at samba.org
vlendec at samba.org
Wed Sep 15 15:13:03 GMT 2004
Author: vlendec
Date: 2004-09-15 15:13:03 +0000 (Wed, 15 Sep 2004)
New Revision: 2352
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/nsswitch&rev=2352&nolog=1
Log:
Fix use of an uninitialized variable. valgrind is sooo useful.
Fix a memleak.
Volker
Modified:
trunk/source/nsswitch/winbindd_cache.c
Changeset:
Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c 2004-09-15 15:12:36 UTC (rev 2351)
+++ trunk/source/nsswitch/winbindd_cache.c 2004-09-15 15:13:03 UTC (rev 2352)
@@ -631,7 +631,6 @@
{
struct cache_entry *centry;
fstring uname;
- fstring sid_string;
centry = centry_start(domain, status);
if (!centry)
@@ -641,7 +640,8 @@
fstrcpy(uname, name);
strupper_m(uname);
centry_end(centry, "NS/%s/%s", domain_name, uname);
- DEBUG(10,("wcache_save_name_to_sid: %s -> %s\n", uname, sid_string));
+ DEBUG(10,("wcache_save_name_to_sid: %s -> %s\n", uname,
+ sid_string_static(sid)));
centry_free(centry);
}
@@ -1954,6 +1954,8 @@
for (i=0; i<num_groups; i++)
user_sids[i] = centry_sid(centry, mem_ctx);
+ centry_free(centry);
+
/* work out the response size */
for (i = 0; i < num_groups; i++) {
const char *s = sid_string_static(user_sids[i]);
More information about the samba-cvs
mailing list