git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f262f80
)
Fix coverity #900. Resource leak.
author
Jeremy Allison
<jra@samba.org>
Fri, 19 Jun 2009 23:44:15 +0000
(16:44 -0700)
committer
Jeremy Allison
<jra@samba.org>
Fri, 19 Jun 2009 23:44:15 +0000
(16:44 -0700)
Jeremy.
source3/utils/smbpasswd.c
patch
|
blob
|
history
diff --git
a/source3/utils/smbpasswd.c
b/source3/utils/smbpasswd.c
index c0b2cac18a106bce399797d37be54492cad5618d..7957dd8a62a5250401336ae1b81a74aaea68ea83 100644
(file)
--- a/
source3/utils/smbpasswd.c
+++ b/
source3/utils/smbpasswd.c
@@
-398,6
+398,10
@@
static int process_root(int local_flags)
if (remote_machine != NULL) {
old_passwd = get_pass("Old SMB password:",stdin_passwd_get);
+ if(!old_passwd) {
+ fprintf(stderr, "Unable to get old password.\n");
+ exit(1);
+ }
}
if (!(local_flags & LOCAL_SET_PASSWORD)) {
@@
-478,6
+482,7
@@
static int process_root(int local_flags)
}
done:
+ SAFE_FREE(old_passwd);
SAFE_FREE(new_passwd);
return result;
}