mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Add checks for functions in test-ratelim.c; found by Coverity
This commit is contained in:
parent
7ef04e4b48
commit
aa501e1a7e
@ -287,10 +287,18 @@ test_ratelimiting(void)
|
||||
|
||||
base = event_base_new_with_config(base_cfg);
|
||||
event_config_free(base_cfg);
|
||||
if (! base) {
|
||||
fprintf(stderr, "Couldn't create event_base");
|
||||
return 1;
|
||||
}
|
||||
|
||||
listener = evconnlistener_new_bind(base, echo_listenercb, base,
|
||||
LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE, -1,
|
||||
(struct sockaddr *)&sin, sizeof(sin));
|
||||
if (! listener) {
|
||||
fprintf(stderr, "Couldn't create listener");
|
||||
return 1;
|
||||
}
|
||||
|
||||
slen = sizeof(ss);
|
||||
if (getsockname(evconnlistener_get_fd(listener), (struct sockaddr *)&ss,
|
||||
|
Loading…
x
Reference in New Issue
Block a user