svn commit: samba r3076 - in
branches/SAMBA_4_0/source/rpc_server/netlogon: .
abartlet at samba.org
abartlet at samba.org
Wed Oct 20 02:11:41 GMT 2004
Author: abartlet
Date: 2004-10-20 02:11:40 +0000 (Wed, 20 Oct 2004)
New Revision: 3076
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/rpc_server/netlogon&rev=3076&nolog=1
Log:
Fix memory leak.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/rpc_server/netlogon/schannel_state.c
Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/schannel_state.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/netlogon/schannel_state.c 2004-10-20 02:10:46 UTC (rev 3075)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/schannel_state.c 2004-10-20 02:11:40 UTC (rev 3076)
@@ -68,7 +68,7 @@
return NT_STATUS_NO_MEMORY;
}
- asprintf(&s, "%u", (unsigned int)expiry);
+ s = talloc_asprintf(mem_ctx, "%u", (unsigned int)expiry);
if (s == NULL) {
talloc_free(ldb);
@@ -97,6 +97,8 @@
ret = ldb_add(ldb->ldb, &msg);
+ talloc_free(s);
+
if (ret != 0) {
DEBUG(0,("Unable to add %s to session key db - %s\n",
msg.dn, ldb_errstring(ldb->ldb)));
More information about the samba-cvs
mailing list