* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.9.2.3 2003/03/06 21:45:57 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.9.2.4 2003/03/14 22:45:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
val = strdup(PQgetvalue(res, i, 2));
tok = strtok(val, ",{}");
- do
+ while (tok)
{
PGresult *res2;
PQExpBuffer buf2 = createPQExpBuffer();
tok = strtok(NULL, "{},");
}
- while (tok);
+ free(val);
printf("%s", buf->data);
destroyPQExpBuffer(buf);