From f531d14fd2b3b26c420127c04c5d8e6f882046d6 Mon Sep 17 00:00:00 2001 From: tanzercakir-commits Date: Wed, 12 Aug 2026 16:22:39 +0300 Subject: [PATCH] fix: check allocation before initialization --- src/configuration.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/configuration.c b/src/configuration.c index 86f8f6c8..6f897543 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -934,6 +934,8 @@ int parse_config_file(const char *path) { bindaddr_t *new_empty_bindaddr(void) { bindaddr_t *ba; ba = malloc(sizeof(bindaddr_t)); + if (!ba) + return NULL; memset(ba, 0, sizeof(*ba)); ba->type = BIND_ADDR_TCP; ba->service = strdup("5140");