Commit af238f56 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Avoid potential double free (Coverity).

parent 62529328
......@@ -507,13 +507,13 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
}
if (pwrite( shared_fd, buffer, file_size, write_pos ) != file_size) goto error;
}
free( buffer );
if (!(shared = alloc_object( &shared_map_ops ))) goto error;
shared->fd = (struct fd *)grab_object( mapping->fd );
shared->file = file;
list_add_head( &shared_map_list, &shared->entry );
mapping->shared = shared;
free( buffer );
return 1;
error:
......
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