mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	ipc-client: free payload after sending it over the socket
Fixes memory leaks in the form of:
Direct leak of 20 byte(s) in 1 object(s) allocated from:
    #0 0x7f5f7c2f4f30 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xedf30)
    #1 0x563c7995b36a in join_args ../common/stringop.c:268
    #2 0x563c798a6a1a in main ../sway/main.c:348
    #3 0x7f5f7b4d609a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
			
			
This commit is contained in:
		
							parent
							
								
									2bbc6c35b0
								
							
						
					
					
						commit
						dfe42cbac2
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -347,6 +347,7 @@ int main(int argc, char **argv) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		char *command = join_args(argv + optind, argc - optind);
 | 
							char *command = join_args(argv + optind, argc - optind);
 | 
				
			||||||
		run_as_ipc_client(command, socket_path);
 | 
							run_as_ipc_client(command, socket_path);
 | 
				
			||||||
 | 
							free(command);
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue