]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Do not allocate more space than we need
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jan 2021 18:35:59 +0000 (18:35 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jan 2021 18:35:59 +0000 (18:35 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pakfire.c

index def9defa9ec7a2e25802e6b7035e79026698ced8..a05dbecb333793716f4a81c0b280eb7b4ca20d62 100644 (file)
@@ -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;