summaryrefslogtreecommitdiff
path: root/src/backend/backup/basebackup_target.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/backup/basebackup_target.c')
-rw-r--r--src/backend/backup/basebackup_target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/backup/basebackup_target.c b/src/backend/backup/basebackup_target.c
index 84b1309d3bd..8b74828aed6 100644
--- a/src/backend/backup/basebackup_target.c
+++ b/src/backend/backup/basebackup_target.c
@@ -96,7 +96,7 @@ BaseBackupAddTarget(char *name,
* name into a newly-allocated chunk of memory.
*/
oldcontext = MemoryContextSwitchTo(TopMemoryContext);
- newtype = palloc(sizeof(BaseBackupTargetType));
+ newtype = palloc_object(BaseBackupTargetType);
newtype->name = pstrdup(name);
newtype->check_detail = check_detail;
newtype->get_sink = get_sink;
@@ -132,7 +132,7 @@ BaseBackupGetTargetHandle(char *target, char *target_detail)
BaseBackupTargetHandle *handle;
/* Found the target. */
- handle = palloc(sizeof(BaseBackupTargetHandle));
+ handle = palloc_object(BaseBackupTargetHandle);
handle->type = ttype;
handle->detail_arg = ttype->check_detail(target, target_detail);