libwbclient: Fix a memleak in wbcGetDisplayName
authorVolker Lendecke <vl@samba.org>
Sat, 10 Apr 2010 14:34:53 +0000 (16:34 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 10 Apr 2010 15:05:38 +0000 (17:05 +0200)
nsswitch/libwbclient/wbc_sid.c

index 091a550badaeeab0ab121c48417708274a5eab13..568713242721ddd6217501d4b470843f21c73fe9 100644 (file)
@@ -782,6 +782,7 @@ wbcErr wbcGetDisplayName(const struct wbcDomainSid *sid,
 
                name = talloc_strdup(NULL, pwd->pw_gecos);
                BAIL_ON_PTR_ERROR(name, wbc_status);
+               wbcFreeMemory(pwd);
        }
 
        wbc_status = WBC_ERR_SUCCESS;