mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Don't try to free old string values (and crash) when they are overridden unless
they were actually found in the source terminal description. Reported by jmc.
This commit is contained in:
		@@ -196,7 +196,8 @@ tty_term_override(struct tty_term *term, const char *overrides)
 | 
				
			|||||||
				case TTYCODE_NONE:
 | 
									case TTYCODE_NONE:
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
				case TTYCODE_STRING:
 | 
									case TTYCODE_STRING:
 | 
				
			||||||
					xfree(code->value.string);
 | 
										if (code->type == TTYCODE_STRING)
 | 
				
			||||||
 | 
											xfree(code->value.string);
 | 
				
			||||||
					code->value.string = xstrdup(val);
 | 
										code->value.string = xstrdup(val);
 | 
				
			||||||
					code->type = ent->type;
 | 
										code->type = ent->type;
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user