mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	server: don't send an error to NULL display_resource
if display_resource = wl_resource_create() fails in bind_display(), we call wl_client_post_no_memory() which is wrong, since this function uses display_resource (which is NULL at this point). said simply: don't send an error to resource that you've just failed to create) https://bugs.freedesktop.org/show_bug.cgi?id=91356 Reported-by: Ashim <ashim.shah@samsung.com> Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
		
							parent
							
								
									693bf00083
								
							
						
					
					
						commit
						1b7191743e
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -779,7 +779,8 @@ bind_display(struct wl_client *client, struct wl_display *display)
 | 
				
			||||||
	client->display_resource =
 | 
						client->display_resource =
 | 
				
			||||||
		wl_resource_create(client, &wl_display_interface, 1, 1);
 | 
							wl_resource_create(client, &wl_display_interface, 1, 1);
 | 
				
			||||||
	if (client->display_resource == NULL) {
 | 
						if (client->display_resource == NULL) {
 | 
				
			||||||
		wl_client_post_no_memory(client);
 | 
							/* DON'T send no-memory error to client - it has no
 | 
				
			||||||
 | 
							 * resource to which it could post the event */
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue