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

Commit2a44306

Browse files
committed
pg_dumpall failed on groups having no members. Per report from
Nick Eskelinen.
1 parentc90354b commit2a44306

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.15 2003/03/06 21:45:52 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.16 2003/03/14 22:45:49 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -327,7 +327,7 @@ dumpGroups(PGconn *conn)
327327

328328
val=strdup(PQgetvalue(res,i,2));
329329
tok=strtok(val,",{}");
330-
do
330+
while (tok)
331331
{
332332
PGresult*res2;
333333
PQExpBufferbuf2=createPQExpBuffer();
@@ -347,7 +347,7 @@ dumpGroups(PGconn *conn)
347347

348348
tok=strtok(NULL,"{},");
349349
}
350-
while (tok);
350+
free(val);
351351

352352
printf("%s",buf->data);
353353
destroyPQExpBuffer(buf);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp