diff options
author | Stefan Metzmacher <metze@samba.org> | 2018-04-24 10:59:05 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2018-05-02 18:56:45 +0200 |
commit | 13f23ec11ef3c932b0cb2000613dfbc6dd14554b (patch) | |
tree | acc437bca224137d0f38c410415d424bb6cf95ae /nsswitch | |
parent | bf0a6646108bd447c05f099a7f345cf2a3bda070 (diff) | |
download | samba-13f23ec11ef3c932b0cb2000613dfbc6dd14554b.tar.gz |
nsswitch: fix memory leak in winbind_open_pipe_sock() when the privileged pipe is not accessable.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13400
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit ffe970007bf934955f72ec2d73bf8f94a2b796eb)
Autobuild-User(v4-8-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-8-test): Wed May 2 18:56:45 CEST 2018 on sn-devel-144
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/wb_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index d6746b4f535..da81734ae3c 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -420,14 +420,14 @@ static int winbind_open_pipe_sock(struct winbindd_context *ctx, ctx->winbindd_fd = fd; ctx->is_privileged = 1; } + + SAFE_FREE(response.extra_data.data); } if ((need_priv != 0) && (ctx->is_privileged == 0)) { return -1; } - SAFE_FREE(response.extra_data.data); - return ctx->winbindd_fd; #else return -1; |