mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Check return of init_keys() ip_address_changed: fix Coverity CID 484
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
o Minor bugfixes:
|
||||
- Report any failure in init_keys() calls done because our IP address
|
||||
has changed. Spotted by Coverity Scan. Bugfix on 0.1.1.4-alpha;
|
||||
fixes CID 484.
|
||||
+2
-1
@@ -1378,7 +1378,8 @@ ip_address_changed(int at_interface)
|
||||
if (at_interface) {
|
||||
if (! server) {
|
||||
/* Okay, change our keys. */
|
||||
init_keys();
|
||||
if (init_keys()<0)
|
||||
log_warn(LD_GENERAL, "Unable to rotate keys after IP change!");
|
||||
}
|
||||
} else {
|
||||
if (server) {
|
||||
|
||||
Reference in New Issue
Block a user