s3-dcerpc: Use a local function to dump pdu regions
[sfrench/samba-autobuild/.git] / nsswitch / wins.c
index 80f01191080c46ea136867773060f30603aaade8..aa95ec7340956cbf70bd5d8a3a66da71042e1e76 100644 (file)
@@ -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