server: Clear last error when creating object without name.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b5c12faa6a
commit
52f9acedd2
|
@ -287,7 +287,11 @@ void *create_named_object_dir( struct directory *root, const struct unicode_str
|
|||
struct object *obj, *new_obj = NULL;
|
||||
struct unicode_str new_name;
|
||||
|
||||
if (!name || !name->len) return alloc_object( ops );
|
||||
if (!name || !name->len)
|
||||
{
|
||||
if ((new_obj = alloc_object( ops ))) clear_error();
|
||||
return new_obj;
|
||||
}
|
||||
|
||||
if (!(obj = find_object_dir( root, name, attributes, &new_name ))) return NULL;
|
||||
if (!new_name.len)
|
||||
|
|
|
@ -671,7 +671,11 @@ static struct named_pipe *create_named_pipe( struct directory *root, const struc
|
|||
struct named_pipe *pipe = NULL;
|
||||
struct unicode_str new_name;
|
||||
|
||||
if (!name || !name->len) return alloc_object( &named_pipe_ops );
|
||||
if (!name || !name->len)
|
||||
{
|
||||
if ((pipe = alloc_object( &named_pipe_ops ))) clear_error();
|
||||
return pipe;
|
||||
}
|
||||
|
||||
if (!(obj = find_object_dir( root, name, attr, &new_name )))
|
||||
{
|
||||
|
|
|
@ -242,7 +242,11 @@ void *create_named_object( struct namespace *namespace, const struct object_ops
|
|||
{
|
||||
struct object *obj;
|
||||
|
||||
if (!name || !name->len) return alloc_object( ops );
|
||||
if (!name || !name->len)
|
||||
{
|
||||
if ((obj = alloc_object( ops ))) clear_error();
|
||||
return obj;
|
||||
}
|
||||
|
||||
if ((obj = find_object( namespace, name, attributes )))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue