lib/base log_file should free filename in all cases
once we've used the filename we built, free it before exit
This commit is contained in:
		 Daria Phoebe Brashear
					Daria Phoebe Brashear
				
			
				
					committed by
					
						 Nico Williams
						Nico Williams
					
				
			
			
				
	
			
			
			 Nico Williams
						Nico Williams
					
				
			
						parent
						
							59d132f825
						
					
				
				
					commit
					c295233648
				
			| @@ -234,13 +234,13 @@ log_file(heim_context context, const char *timestr, const char *msg, void *data) | ||||
|         if (heim_expand_path_tokens(context, f->filename, 1, &filename, NULL)) | ||||
|             return; | ||||
|         fd = open(filename, flags, 0666); | ||||
|         free(filename); | ||||
|         if (fd == -1) { | ||||
|             if (f->disp == FILEDISP_IFEXISTS) | ||||
|                 gettimeofday(&f->tv, NULL); | ||||
|             return; | ||||
|         } | ||||
|         f->fd = fdopen(fd, f->mode); | ||||
|         free(filename); | ||||
|     } | ||||
|     if (f->fd == NULL) | ||||
|         return; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user