aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_custom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_custom.c')
-rw-r--r--src/bin/pg_dump/pg_backup_custom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_backup_custom.c b/src/bin/pg_dump/pg_backup_custom.c
index f7dc5be8e5a..c9adc6f82fe 100644
--- a/src/bin/pg_dump/pg_backup_custom.c
+++ b/src/bin/pg_dump/pg_backup_custom.c
@@ -129,7 +129,7 @@ InitArchiveFmt_Custom(ArchiveHandle *AH)
AH->DeClonePtr = _DeClone;
/* Set up a private area. */
- ctx = (lclContext *) pg_calloc(1, sizeof(lclContext));
+ ctx = (lclContext *) pg_malloc0(sizeof(lclContext));
AH->formatData = (void *) ctx;
/* Initialize LO buffering */
@@ -198,7 +198,7 @@ _ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
{
lclTocEntry *ctx;
- ctx = (lclTocEntry *) pg_calloc(1, sizeof(lclTocEntry));
+ ctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
if (te->dataDumper)
ctx->dataState = K_OFFSET_POS_NOT_SET;
else
@@ -239,7 +239,7 @@ _ReadExtraToc(ArchiveHandle *AH, TocEntry *te)
if (ctx == NULL)
{
- ctx = (lclTocEntry *) pg_calloc(1, sizeof(lclTocEntry));
+ ctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
te->formatData = (void *) ctx;
}