diff options
author | Volker Lendecke <vl@samba.org> | 2010-03-20 15:23:17 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-03-20 14:38:13 +0100 |
commit | 09f270e748263f2fb02683a9376ae185a5534178 (patch) | |
tree | 992a59f9a0de882c0ee6c5128b2e1ff574d7821f /nsswitch/wins.c | |
parent | c04922ec20034beec9e37232ce5fa35596bf7ca0 (diff) | |
download | samba-09f270e748263f2fb02683a9376ae185a5534178.tar.gz |
s3: Fix bug 7202
Make sure _nss_wins_gethostbyname_r has a talloc stackframe available
Thanks to Sergey Tereschenko <serg.partizan@gmail.com> for reporting the bug!
Volker
Diffstat (limited to 'nsswitch/wins.c')
-rw-r--r-- | nsswitch/wins.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nsswitch/wins.c b/nsswitch/wins.c index 80f01191080..aa95ec73409 100644 --- a/nsswitch/wins.c +++ b/nsswitch/wins.c @@ -333,11 +333,14 @@ _nss_wins_gethostbyname_r(const char *hostname, struct hostent *he, int i, count; fstring name; size_t namelen; + TALLOC_CTX *frame; #if HAVE_PTHREAD pthread_mutex_lock(&wins_nss_mutex); #endif + frame = talloc_stackframe(); + memset(he, '\0', sizeof(*he)); fstrcpy(name, hostname); @@ -421,6 +424,8 @@ _nss_wins_gethostbyname_r(const char *hostname, struct hostent *he, out: + TALLOC_FREE(frame); + #if HAVE_PTHREAD pthread_mutex_unlock(&wins_nss_mutex); #endif |