Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
43568d11
Commit
43568d11
authored
Oct 18, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leakage when sending notice messages to client.
parent
aed378e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
31 deletions
+11
-31
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+11
-31
No files found.
src/backend/utils/error/elog.c
View file @
43568d11
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.8
8 2001/08/06 21:55:13 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.8
9 2001/10/18 23:07:29 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -63,11 +63,13 @@ bool Log_pid;
static
const
char
*
print_timestamp
(
void
);
static
const
char
*
print_pid
(
void
);
static
void
send_notice_to_frontend
(
const
char
*
msg
);
static
void
send_error_to_frontend
(
const
char
*
msg
);
static
void
send_message_to_frontend
(
int
type
,
const
char
*
msg
);
static
const
char
*
useful_strerror
(
int
errnum
);
static
const
char
*
elog_message_prefix
(
int
lev
);
#define send_notice_to_frontend(msg) send_message_to_frontend(NOTICE, msg)
#define send_error_to_frontend(msg) send_message_to_frontend(ERROR, msg)
static
int
Debugfile
=
-
1
;
...
...
@@ -667,40 +669,18 @@ write_syslog(int level, const char *line)
#endif
/* ENABLE_SYSLOG */
static
void
send_notice_or_error_to_frontend
(
int
type
,
const
char
*
msg
);
static
void
send_notice_to_frontend
(
const
char
*
msg
)
{
send_notice_or_error_to_frontend
(
NOTICE
,
msg
);
}
static
void
send_error_to_frontend
(
const
char
*
msg
)
{
send_notice_or_error_to_frontend
(
ERROR
,
msg
);
}
static
void
send_
notice_or_error
_to_frontend
(
int
type
,
const
char
*
msg
)
send_
message
_to_frontend
(
int
type
,
const
char
*
msg
)
{
StringInfo
buf
;
StringInfo
Data
buf
;
AssertArg
(
type
==
NOTICE
||
type
==
ERROR
);
buf
=
makeStringInfo
();
pq_beginmessage
(
buf
);
pq_sendbyte
(
buf
,
type
==
NOTICE
?
'N'
:
'E'
);
pq_sendstring
(
buf
,
msg
);
pq_endmessage
(
buf
);
pq_beginmessage
(
&
buf
);
pq_sendbyte
(
&
buf
,
type
==
NOTICE
?
'N'
:
'E'
);
pq_sendstring
(
&
buf
,
msg
);
pq_endmessage
(
&
buf
);
pfree
(
buf
);
/*
* This flush is normally not necessary, since postgres.c will
* flush out waiting data when control returns to the main loop.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment