Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit152d24f

Browse files
committed
Fix minor leak in pg_dump
Move allocation to after we check the remote server version, to avoida possible, very minor, memory leak. This makes us more consistentthroughout as most places in pg_dump are done in the same way (due, inpart, to previous fixes like this).Spotted by the Coverity scanner.
1 parenta7e5f7b commit152d24f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3602,7 +3602,7 @@ getConversions(Archive *fout, int *numConversions)
36023602
PGresult*res;
36033603
intntups;
36043604
inti;
3605-
PQExpBufferquery=createPQExpBuffer();
3605+
PQExpBufferquery;
36063606
ConvInfo*convinfo;
36073607
inti_tableoid;
36083608
inti_oid;
@@ -3617,6 +3617,8 @@ getConversions(Archive *fout, int *numConversions)
36173617
returnNULL;
36183618
}
36193619

3620+
query=createPQExpBuffer();
3621+
36203622
/*
36213623
* find all conversions, including builtin conversions; we filter out
36223624
* system-defined conversions at dump-out time.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp