aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogrecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xlogrecovery.c')
-rw-r--r--src/backend/access/transam/xlogrecovery.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 2c19013c98b..0aa3ab59085 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -4833,7 +4833,9 @@ check_recovery_target_lsn(char **newval, void **extra, GucSource source)
if (have_error)
return false;
- myextra = (XLogRecPtr *) guc_malloc(ERROR, sizeof(XLogRecPtr));
+ myextra = (XLogRecPtr *) guc_malloc(LOG, sizeof(XLogRecPtr));
+ if (!myextra)
+ return false;
*myextra = lsn;
*extra = myextra;
}
@@ -4997,7 +4999,9 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
}
}
- myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(ERROR, sizeof(RecoveryTargetTimeLineGoal));
+ myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(LOG, sizeof(RecoveryTargetTimeLineGoal));
+ if (!myextra)
+ return false;
*myextra = rttg;
*extra = myextra;
@@ -5033,7 +5037,9 @@ check_recovery_target_xid(char **newval, void **extra, GucSource source)
if (errno == EINVAL || errno == ERANGE)
return false;
- myextra = (TransactionId *) guc_malloc(ERROR, sizeof(TransactionId));
+ myextra = (TransactionId *) guc_malloc(LOG, sizeof(TransactionId));
+ if (!myextra)
+ return false;
*myextra = xid;
*extra = myextra;
}