tree-wide: check parameter before dereferencing

This commit is contained in:
David Tardon
2022-09-13 08:13:42 +02:00
parent 995340074e
commit c9958c4fc5
5 changed files with 28 additions and 8 deletions
+5 -1
View File
@@ -95,9 +95,13 @@ static int idle_time_cb(sd_event_source *s, uint64_t usec, void *userdata) {
}
static int connection_release(Connection *c) {
Context *context = c->context;
Context *context;
int r;
assert(c);
context = ASSERT_PTR(c->context);
connection_free(c);
if (arg_exit_idle_time < USEC_INFINITY && set_isempty(context->connections)) {