diff options
author | Volker Lendecke <vl@sernet.de> | 2008-08-23 13:12:05 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-08-23 13:19:35 +0200 |
commit | 03dfaf37fd34a696dd6c586ec10b3134c5af0341 (patch) | |
tree | be0d3c43fa08103e5da63a33deda7df6dd9f95f8 | |
parent | 6e89443ebacaa082c50935e4359f70686e1cc184 (diff) | |
download | samba-03dfaf37fd34a696dd6c586ec10b3134c5af0341.tar.gz samba-03dfaf37fd34a696dd6c586ec10b3134c5af0341.tar.bz2 samba-03dfaf37fd34a696dd6c586ec10b3134c5af0341.zip |
Fix a memleak in calculate_next_machine_pwd_change
(This used to be commit 5314f06dcdf14ce5e038a03a3e4dfded227bd00c)
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index aa6da545d3..4d879c6fc4 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -852,14 +852,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")); |