diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-11 21:46:52 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-11 21:46:52 -0800 |
commit | d068bc64b6f16bc0b4a8170b56f6aadd487d7203 (patch) | |
tree | 13f578c3343d7330a907a8510d3b1730879328bf /source3/smbd/chgpasswd.c | |
parent | 91c1933e675ed8bc0a0fad49a6f651273f29df95 (diff) | |
download | samba-d068bc64b6f16bc0b4a8170b56f6aadd487d7203.tar.gz samba-d068bc64b6f16bc0b4a8170b56f6aadd487d7203.tar.bz2 samba-d068bc64b6f16bc0b4a8170b56f6aadd487d7203.zip |
Three more pstring removals.
Jeremy.
(This used to be commit c15819b75751a1e15cfed2ef94dae10ee72d769c)
Diffstat (limited to 'source3/smbd/chgpasswd.c')
-rw-r--r-- | source3/smbd/chgpasswd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index d89442150f..6e7ef208c1 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -262,14 +262,18 @@ static int expect(int master, char *issue, char *expected) { /* Eat leading/trailing whitespace before match. */ - pstring str; - pstrcpy( str, buffer); - trim_char( str, ' ', ' '); + char *str = SMB_STRDUP(buffer); + if (!str) { + DEBUG(2,("expect: ENOMEM\n")); + return False; + } + trim_char(str, ' ', ' '); if ((match = unix_wild_match(expected, str)) == True) { /* Now data has started to return, lower timeout. */ timeout = lp_passwd_chat_timeout() * 100; } + SAFE_FREE(str); } } |