Jinoh Kang (@iamahuman) commented about server/mapping.c:
+struct object *create_session_mapping( struct object *root, const struct unicode_str *name,
unsigned int attr, const struct security_descriptor *sd )
+{
- static const unsigned int access = FILE_READ_DATA | FILE_WRITE_DATA;
- struct mapping *mapping;
- void *tmp;
- if (!(mapping = create_mapping( root, name, attr, 0x10000, SEC_COMMIT, 0, access, sd ))) return NULL;
- if ((tmp = mmap( NULL, mapping->size, PROT_READ | PROT_WRITE, MAP_SHARED, get_unix_fd( mapping->fd ), 0 )) == MAP_FAILED)
- {
release_object( &mapping->obj );
return NULL;
- }
- session_mapping = mapping;
`session_mapping` should be treated as a reference.
```suggestion:-0+0 session_mapping = (struct mapping *)grab_object( &mapping->obj ); ```