mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	input-method-v2: free current strings on commit
This commit is contained in:
		
							parent
							
								
									81f5607ad9
								
							
						
					
					
						commit
						6ee5bd9eee
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -80,6 +80,8 @@ static void im_commit(struct wl_client *client, struct wl_resource *resource,
 | 
				
			||||||
	if (!input_method) {
 | 
						if (!input_method) {
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						free(input_method->current.commit_text);
 | 
				
			||||||
 | 
						free(input_method->current.preedit.text);
 | 
				
			||||||
	input_method->current = input_method->pending;
 | 
						input_method->current = input_method->pending;
 | 
				
			||||||
	input_method->current_serial = serial;
 | 
						input_method->current_serial = serial;
 | 
				
			||||||
	input_method->pending = (struct wlr_input_method_v2_state){0};
 | 
						input_method->pending = (struct wlr_input_method_v2_state){0};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue