dmxVDLRead: if we opened a file, close it instead of leaking it
Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
		
							parent
							
								
									8c5ff2e93f
								
							
						
					
					
						commit
						6bca0184d1
					
				| 
						 | 
					@ -228,5 +228,9 @@ dmxVDLRead(const char *filename)
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (str != stdin)
 | 
				
			||||||
 | 
					        fclose(str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return entry;
 | 
					    return entry;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue