From 2dc971648feebf5b1b6d39fc30f24946460a18f9 Mon Sep 17 00:00:00 2001 From: Youzhong Yang Date: Mon, 20 Apr 2015 09:42:42 -0400 Subject: [PATCH] s3-unix_msg: remove socket file after closing socket fd This is needed on Solaris. It fixes https://bugzilla.samba.org/show_bug.cgi?id=11217 Reviewed-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Wed Apr 22 03:43:30 CEST 2015 on sn-devel-104 (cherry picked from commit 74e684db80f1e80592f642d29669bbcbe8db17ba) --- source3/lib/unix_msg/unix_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c index 00ac7f5..9cb3c07 100644 --- a/source3/lib/unix_msg/unix_msg.c +++ b/source3/lib/unix_msg/unix_msg.c @@ -784,13 +784,13 @@ static int unix_dgram_free(struct unix_dgram_ctx *ctx) ctx->ev_funcs->watch_free(ctx->sock_read_watch); + close(ctx->sock); if (getpid() == ctx->created_pid) { /* If we created it, unlink. Otherwise someone else might * still have it open */ unlink(ctx->path); } - close(ctx->sock); free(ctx->recv_buf); free(ctx); return 0; -- 1.9.1