mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fixed resource leak on ubus_init failure.
When ubus_add_object fails, the ubus_connect object is not freed, so the connection leaks. Add ubus_destroy to free the connection object. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
This commit is contained in:
committed by
Simon Kelley
parent
0506a5ed4e
commit
3f60ecd6f0
@@ -102,6 +102,7 @@ void ubus_init()
|
||||
my_syslog(LOG_ERR, _("Cannot add object to UBus: %s"), ubus_strerror(ret));
|
||||
error_logged = 1;
|
||||
}
|
||||
ubus_destroy(ubus);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user