diff --git a/source/libs/tdb/src/db/pgcache.c b/source/libs/tdb/src/db/pgcache.c index 25ce90e772..5ca65e366e 100644 --- a/source/libs/tdb/src/db/pgcache.c +++ b/source/libs/tdb/src/db/pgcache.c @@ -12,7 +12,6 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ - #include "tdbInt.h" struct SPage { @@ -37,12 +36,22 @@ struct SPgCache { }; int pgCacheCreate(SPgCache **ppPgCache) { - // TODO + SPgCache *pPgCache; + + pPgCache = (SPgCache *)calloc(1, sizeof(*pPgCache)); + if (pPgCache == NULL) { + return -1; + } + + *ppPgCache = pPgCache; return 0; } int pgCacheDestroy(SPgCache *pPgCache) { - // TODO + if (pPgCache) { + free(pPgCache); + } + return 0; }