diff options
author | Volker Lendecke <vl@sernet.de> | 2008-08-23 13:12:05 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-11-26 10:13:34 +0100 |
commit | 7f47acbe4a1b40abcec747f384d06b57e83d6386 (patch) | |
tree | 428fc2c224462fcdb289200f90b17c5cb376ecd6 /source/winbindd/winbindd_dual.c | |
parent | 021fe091091888180e64ad1cdcca4b4e33a0052e (diff) | |
download | samba-7f47acbe4a1b40abcec747f384d06b57e83d6386.tar.gz samba-7f47acbe4a1b40abcec747f384d06b57e83d6386.tar.xz samba-7f47acbe4a1b40abcec747f384d06b57e83d6386.zip |
Fix a memleak in calculate_next_machine_pwd_change (This used to be commit 5314f06dcdf14ce5e038a03a3e4dfded227bd00c)
(cherry picked from commit fa20fa5d243ee640f5d564525358c1f5ba2df3a7)
Diffstat (limited to 'source/winbindd/winbindd_dual.c')
-rw-r--r-- | source/winbindd/winbindd_dual.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c index e4e6544dea4..403a9bc8d86 100644 --- a/source/winbindd/winbindd_dual.c +++ b/source/winbindd/winbindd_dual.c @@ -883,14 +883,19 @@ static bool calculate_next_machine_pwd_change(const char *domain, time_t pass_last_set_time; time_t timeout; time_t next_change; + char *pw; - if (!secrets_fetch_machine_password(domain, + pw = secrets_fetch_machine_password(domain, &pass_last_set_time, - NULL)) { + NULL); + + if (pw == NULL) { DEBUG(0,("cannot fetch own machine password ????")); return false; } + SAFE_FREE(pw); + timeout = get_machine_password_timeout(); if (timeout == 0) { DEBUG(10,("machine password never expires\n")); |