Skip to content

Commit 2a44306

Browse files
committed
pg_dumpall failed on groups having no members. Per report from
Nick Eskelinen.
1 parent c90354b commit 2a44306

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
PQExpBuffer buf2 = 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy