mirror of
				https://github.com/swaywm/sway.git
				synced 2025-10-29 05:40:18 -04:00 
			
		
		
		
	swaybar: fix command malloc in workspace command
This fixes a typo on the malloc line in ipc_send_workspace_command. The plus one to the size for the null-terminator was outside of the malloc call, which was causing the incorrect pointer to be freed later in the function.
This commit is contained in:
		
							parent
							
								
									d7d906c7fd
								
							
						
					
					
						commit
						9e6c6ce332
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -20,7 +20,7 @@ void ipc_send_workspace_command(struct swaybar *bar, const char *ws) { | |||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	char *command = malloc(size) + 1; | ||||
| 	char *command = malloc(size + 1); | ||||
| 	if (!command) { | ||||
| 		return; | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brian Ashworth
						Brian Ashworth