mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix a null-deref-on-fail in unit tests
If geoip_format_bridge_stats() returned NULL when it should have returned a string, we would have tried to deref NULL, and died. Not a big deal in the unit tests, but still worth fixing. Found by coverity; This is CID 743384.
This commit is contained in:
parent
fc35ee4910
commit
9b2bb901d7
@ -1678,6 +1678,7 @@ test_geoip(void)
|
||||
* the connecting clients added above. */
|
||||
geoip_bridge_stats_init(now);
|
||||
s = geoip_format_bridge_stats(now + 86400);
|
||||
test_assert(s);
|
||||
test_streq(bridge_stats_1, s);
|
||||
tor_free(s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user