libwbclient: Fix a memleak in wbcListTrusts
authorVolker Lendecke <vl@samba.org>
Sun, 4 Apr 2010 20:26:40 +0000 (22:26 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 4 Apr 2010 21:22:52 +0000 (23:22 +0200)
nsswitch/libwbclient/wbc_util.c

index 2a1285e9169653429bf2ba95d4a8b024ef7543e2..2c2ae55d4c04aa9b84b7901ba569b5dae2f49488 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "replace.h"
 #include "libwbclient.h"
+#include "../winbind_client.h"
 
 /** @brief Ping winbindd to see if the daemon is running
  *
@@ -469,6 +470,8 @@ wbcErr wbcListTrusts(struct wbcDomainInfo **domains, size_t *num_domains)
        *num_domains = i;
 
  done:
+       winbindd_free_response(&response);
+
        if (!WBC_ERROR_IS_OK(wbc_status)) {
                if (d_list)
                        talloc_free(d_list);