Alexandre Julliard : server: Fix initialization of mailslot objects that don't have a name.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 28 10:06:45 CST 2016


Module: wine
Branch: master
Commit: b47bd4555c0d1a37dbd48897e37c67ee0f2ad05d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b47bd4555c0d1a37dbd48897e37c67ee0f2ad05d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jan 28 22:33:12 2016 +0900

server: Fix initialization of mailslot objects that don't have a name.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/mailslot.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/mailslot.c b/server/mailslot.c
index 0d93f42..b135fb2 100644
--- a/server/mailslot.c
+++ b/server/mailslot.c
@@ -403,7 +403,11 @@ static struct mailslot *create_mailslot( struct directory *root,
     struct mailslot *mailslot;
     int fds[2];
 
-    if (!name || !name->len) return alloc_object( &mailslot_ops );
+    if (!name || !name->len)
+    {
+        mailslot = alloc_object( &mailslot_ops );
+        goto init;
+    }
 
     if (!(obj = find_object_dir( root, name, attr, &new_name )))
     {
@@ -435,6 +439,7 @@ static struct mailslot *create_mailslot( struct directory *root,
     mailslot = create_object( dev->mailslots, &mailslot_ops, &new_name, NULL );
     release_object( dev );
 
+init:
     if (!mailslot) return NULL;
 
     mailslot->fd = NULL;




More information about the wine-cvs mailing list