fix(network): free the message instead of the socket
This commit is contained in:
		
							parent
							
								
									baa7f52e21
								
							
						
					
					
						commit
						f6c2a8d9b7
					
				| 
						 | 
					@ -429,7 +429,7 @@ auto waybar::modules::Network::getInfo() -> void
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  struct nl_msg* nl_msg = nlmsg_alloc();
 | 
					  struct nl_msg* nl_msg = nlmsg_alloc();
 | 
				
			||||||
  if (nl_msg == nullptr) {
 | 
					  if (nl_msg == nullptr) {
 | 
				
			||||||
    nl_socket_free(sk_);
 | 
					    nlmsg_free(nl_msg);
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (genlmsg_put(nl_msg, NL_AUTO_PORT, NL_AUTO_SEQ, nl80211_id_, 0, NLM_F_DUMP,
 | 
					  if (genlmsg_put(nl_msg, NL_AUTO_PORT, NL_AUTO_SEQ, nl80211_id_, 0, NLM_F_DUMP,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue