Module: wine Branch: master Commit: 8c944f7a9d202be199ff2804e0236120fca9e95b URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c944f7a9d202be199ff2804e0...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Oct 4 10:08:31 2017 +0200
server: Keep a reference to the shared PE mapping in mapped views.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
server/mapping.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/server/mapping.c b/server/mapping.c index 57bf716..f9f50ed 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -123,6 +123,7 @@ struct memory_view struct list entry; /* entry in per-process view list */ struct fd *fd; /* fd for mapped file */ struct ranges *committed; /* list of committed ranges in this mapping */ + struct shared_map *shared; /* temp file for shared PE mapping */ unsigned int flags; /* SEC_* flags */ client_ptr_t base; /* view base address (in process addr space) */ mem_size_t size; /* view size */ @@ -311,6 +312,7 @@ static void free_memory_view( struct memory_view *view ) { if (view->fd) release_object( view->fd ); if (view->committed) release_object( view->committed ); + if (view->shared) release_object( view->shared ); list_remove( &view->entry ); free( view ); } @@ -958,6 +960,7 @@ DECL_HANDLER(map_view) view->flags = mapping->flags; view->fd = !is_fd_removable( mapping->fd ) ? (struct fd *)grab_object( mapping->fd ) : NULL; view->committed = mapping->committed ? (struct ranges *)grab_object( mapping->committed ) : NULL; + view->shared = mapping->shared ? (struct shared_map *)grab_object( mapping->shared ) : NULL; list_add_tail( ¤t->process->views, &view->entry ); }