Commit b47bd455 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 41cb62ac
...@@ -403,7 +403,11 @@ static struct mailslot *create_mailslot( struct directory *root, ...@@ -403,7 +403,11 @@ static struct mailslot *create_mailslot( struct directory *root,
struct mailslot *mailslot; struct mailslot *mailslot;
int fds[2]; 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 ))) if (!(obj = find_object_dir( root, name, attr, &new_name )))
{ {
...@@ -435,6 +439,7 @@ static struct mailslot *create_mailslot( struct directory *root, ...@@ -435,6 +439,7 @@ static struct mailslot *create_mailslot( struct directory *root,
mailslot = create_object( dev->mailslots, &mailslot_ops, &new_name, NULL ); mailslot = create_object( dev->mailslots, &mailslot_ops, &new_name, NULL );
release_object( dev ); release_object( dev );
init:
if (!mailslot) return NULL; if (!mailslot) return NULL;
mailslot->fd = NULL; mailslot->fd = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment