mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	vulkan: check results of stat
This commit is contained in:
		
							parent
							
								
									f1dc3d9728
								
							
						
					
					
						commit
						4f60dcadc6
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -327,7 +327,11 @@ static VkShaderModule createShaderModule(struct vulkan_state *s, const char* sha
 | 
				
			||||||
		spa_log_error(s->log, "can't open %s: %m", shaderFile);
 | 
							spa_log_error(s->log, "can't open %s: %m", shaderFile);
 | 
				
			||||||
		return VK_NULL_HANDLE;
 | 
							return VK_NULL_HANDLE;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	fstat(fd, &stat);
 | 
						if (fstat(fd, &stat) < 0) {
 | 
				
			||||||
 | 
							spa_log_error(s->log, "can't stat %s: %m", shaderFile);
 | 
				
			||||||
 | 
							close(fd);
 | 
				
			||||||
 | 
							return VK_NULL_HANDLE;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	data = mmap(NULL, stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
 | 
						data = mmap(NULL, stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue