From 6cd94fad12ca4e038aac409e8e1cb9a332a80a39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Tue, 8 Aug 2017 17:50:21 +0200 Subject: [PATCH] afb-session: fix an over allocation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Thanks to Markus Fritzsch and clang-check Change-Id: I4822eb14bff49680df05e472363228cc82566edf Signed-off-by: José Bollo --- src/afb-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afb-session.c b/src/afb-session.c index 7c8f91c4..d3e658dd 100644 --- a/src/afb-session.c +++ b/src/afb-session.c @@ -120,7 +120,7 @@ static void free_data (struct afb_session *session) void afb_session_init (int max_session_count, int timeout, const char *initok) { // let's create as store as hashtable does not have any - sessions.store = calloc (1 + (unsigned)max_session_count, sizeof(struct afb_session)); + sessions.store = calloc (1 + (unsigned)max_session_count, sizeof *sessions.store); pthread_mutex_init(&sessions.mutex, NULL); sessions.max = max_session_count; sessions.timeout = timeout; -- 2.16.6