summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2005-03-20 13:54:53 +0000
committerBruce Momjian2005-03-20 13:54:53 +0000
commita52ca4ceb1fc43a9e8c35078b74c251fe455b4c5 (patch)
tree396d2fa4cbc3f1500340e86ba3d665be11aa3745
parent2b295e82c6e0d9b428686f5eed141f0e6958741b (diff)
Add mention of why malloc() has to be used in snprintf.c.
-rw-r--r--src/port/snprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/port/snprintf.c b/src/port/snprintf.c
index d122026a3b..c48f7336dd 100644
--- a/src/port/snprintf.c
+++ b/src/port/snprintf.c
@@ -225,6 +225,7 @@ dopr(char *buffer, const char *format, va_list args, char *end)
if (*p == '%') /* counts %% as two, so overcounts */
percents++;
+ /* Need to use malloc() because memory system might not be started yet. */
if ((fmtpar = malloc(sizeof(struct fmtpar) * percents)) == NULL)
{
fprintf(stderr, _("out of memory\n"));