mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:07:38 +00:00 
			
		
		
		
	Do not double free expanded path in source-file, also remove some
unnecessary assignments.
This commit is contained in:
		
							
								
								
									
										4
									
								
								file.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								file.c
									
									
									
									
									
								
							@@ -558,7 +558,7 @@ file_write_open(struct client_files *files, struct tmuxpeer *peer,
 | 
			
		||||
	log_debug("open write file %d %s", msg->stream, path);
 | 
			
		||||
 | 
			
		||||
	find.stream = msg->stream;
 | 
			
		||||
	if ((cf = RB_FIND(client_files, files, &find)) != NULL) {
 | 
			
		||||
	if (RB_FIND(client_files, files, &find) != NULL) {
 | 
			
		||||
		error = EBADF;
 | 
			
		||||
		goto reply;
 | 
			
		||||
	}
 | 
			
		||||
@@ -717,7 +717,7 @@ file_read_open(struct client_files *files, struct tmuxpeer *peer,
 | 
			
		||||
	log_debug("open read file %d %s", msg->stream, path);
 | 
			
		||||
 | 
			
		||||
	find.stream = msg->stream;
 | 
			
		||||
	if ((cf = RB_FIND(client_files, files, &find)) != NULL) {
 | 
			
		||||
	if (RB_FIND(client_files, files, &find) != NULL) {
 | 
			
		||||
		error = EBADF;
 | 
			
		||||
		goto reply;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user