]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nsswitch: Simplify wbcCtxDcInfo()
authorVolker Lendecke <vl@samba.org>
Mon, 23 Dec 2024 10:08:35 +0000 (11:08 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 23 Jan 2025 23:08:38 +0000 (23:08 +0000)
Use winbindd_free_response()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15775

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch/libwbclient/wbc_util.c

index 5618039a89d68ca1eb5d0836db09d646f4153fd8..d3de8320b9484b4d84800767c60e62f232789b8f 100644 (file)
@@ -305,8 +305,7 @@ wbcErr wbcCtxDcInfo(struct wbcContext *ctx,
 
         wbc_status = WBC_ERR_SUCCESS;
 done:
-       if (response.extra_data.data)
-               free(response.extra_data.data);
+       winbindd_free_response(&response);
 
        if (WBC_ERROR_IS_OK(wbc_status)) {
                *num_dcs = response.data.num_entries;