From: Michael Tremer Date: Tue, 19 Jan 2021 18:35:59 +0000 (+0000) Subject: libpakfire: Do not allocate more space than we need X-Git-Tag: 0.9.28~1285^2~843 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db46e1b9db24eb393db5877f50fe8ed9c9cc5b0;p=pakfire.git libpakfire: Do not allocate more space than we need Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/pakfire.c b/src/libpakfire/pakfire.c index def9defa9..a05dbecb3 100644 --- a/src/libpakfire/pakfire.c +++ b/src/libpakfire/pakfire.c @@ -101,7 +101,7 @@ PAKFIRE_EXPORT int pakfire_create(Pakfire* pakfire, const char* path, const char return -ENOENT; } - Pakfire p = pakfire_calloc(1, sizeof(*p) * 2); + Pakfire p = pakfire_calloc(1, sizeof(*p)); if (!p) return -ENOMEM;