mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	x11: Dont use buffers after free()
This commit is contained in:
		
							parent
							
								
									eba6f0d32b
								
							
						
					
					
						commit
						8f2e67725e
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -418,13 +418,12 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
 | 
				
			||||||
	attribs[1] = reply->width;
 | 
						attribs[1] = reply->width;
 | 
				
			||||||
	attribs[3] = reply->height;
 | 
						attribs[3] = reply->height;
 | 
				
			||||||
	attribs[5] = buffers[0].pitch / 4;
 | 
						attribs[5] = buffers[0].pitch / 4;
 | 
				
			||||||
	free(reply);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	output->image =
 | 
						output->image =
 | 
				
			||||||
		eglCreateImageKHR(c->base.display, c->base.context,
 | 
							eglCreateImageKHR(c->base.display, c->base.context,
 | 
				
			||||||
				  EGL_DRM_IMAGE_MESA,
 | 
									  EGL_DRM_IMAGE_MESA,
 | 
				
			||||||
				  (EGLClientBuffer) buffers[0].name,
 | 
									  (EGLClientBuffer) buffers[0].name,
 | 
				
			||||||
				  attribs);
 | 
									  attribs);
 | 
				
			||||||
 | 
						free(reply);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	glGenRenderbuffers(1, &output->rbo);
 | 
						glGenRenderbuffers(1, &output->rbo);
 | 
				
			||||||
	glBindRenderbuffer(GL_RENDERBUFFER, output->rbo);
 | 
						glBindRenderbuffer(GL_RENDERBUFFER, output->rbo);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue