summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-07-19 11:28:15 +0000
committerVolker Lendecke <vlendec@samba.org>2003-07-19 11:28:15 +0000
commit7756b4088db0c07e3abd997ddce669888aa6da1f (patch)
tree9f1f62100429a58697a89d76fdc744e5fd3c7788 /source3/passdb
parente45b66ba8a6b6fd669ce7b4f9f8f84f9c26e1575 (diff)
downloadsamba-7756b4088db0c07e3abd997ddce669888aa6da1f.tar.gz
samba-7756b4088db0c07e3abd997ddce669888aa6da1f.tar.bz2
samba-7756b4088db0c07e3abd997ddce669888aa6da1f.zip
Fix memleak
(This used to be commit defc71d4cb9bb1efcb39157bad2806f73b3cc3f5)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/secrets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index bad8e96865..23413e4026 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -195,11 +195,11 @@ const char *trust_keystr(const char *domain)
*
* @return stored password's key
**/
-char *trustdom_keystr(const char *domain)
+static char *trustdom_keystr(const char *domain)
{
- static char* keystr;
+ static pstring keystr;
- asprintf(&keystr, "%s/%s", SECRETS_DOMTRUST_ACCT_PASS, domain);
+ pstr_sprintf(keystr, "%s/%s", SECRETS_DOMTRUST_ACCT_PASS, domain);
strupper_m(keystr);
return keystr;