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

Commitfcd77a6

Browse files
committed
Fix minor memory leaks in pg_dump.
Coverity reported the two oversights in getPublicationTables.Valgrind found the one in determineNotNullFlags.The mistakes in getPublicationTables seem too minor to be worthback-patching. determineNotNullFlags could be run enough timesto matter, but that code is new in v18. So, no back-patch.
1 parentc45963c commitfcd77a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4682,6 +4682,8 @@ getPublicationTables(Archive *fout, TableInfo tblinfo[], int numTables)
46824682
appendPQExpBufferStr(attribs, fmtId(attnames[k]));
46834683
}
46844684
pubrinfo[j].pubrattrs = attribs->data;
4685+
free(attribs);/* but not attribs->data */
4686+
free(attnames);
46854687
}
46864688
else
46874689
pubrinfo[j].pubrattrs = NULL;
@@ -9424,6 +9426,7 @@ determineNotNullFlags(Archive *fout, PGresult *res, int r,
94249426
tbinfo->notnull_constrs[j] =
94259427
pstrdup(PQgetvalue(res, r, i_notnull_name));
94269428
}
9429+
free(default_name);
94279430
}
94289431
}
94299432
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp