aboutsummaryrefslogtreecommitdiff
path: root/src/test/examples/testlo.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-09-22 05:12:45 +0000
committerNeil Conway <neilc@samurai.com>2004-09-22 05:12:45 +0000
commitb84788debc08f64a0cb75cbb1059a6b222c51490 (patch)
tree49d6cafca4700c3efc214f45d0932309c76be641 /src/test/examples/testlo.c
parenta94edb4c7b9daa655b53c10b32bbb3dd69a6ccc1 (diff)
downloadpostgresql-b84788debc08f64a0cb75cbb1059a6b222c51490.tar.gz
postgresql-b84788debc08f64a0cb75cbb1059a6b222c51490.zip
Minor cleanup of libpq/LO examples: fix some memory leaks, update a comment
or two.
Diffstat (limited to 'src/test/examples/testlo.c')
-rw-r--r--src/test/examples/testlo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/examples/testlo.c b/src/test/examples/testlo.c
index 2d5db3a5c2c..988b51171a9 100644
--- a/src/test/examples/testlo.c
+++ b/src/test/examples/testlo.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/test/examples/testlo.c,v 1.22 2004/08/29 04:13:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/test/examples/testlo.c,v 1.23 2004/09/22 05:12:45 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -99,6 +99,7 @@ pickout(PGconn *conn, Oid lobjId, int start, int len)
if (nbytes <= 0)
break; /* no more data? */
}
+ free(buf);
fprintf(stderr, "\n");
lo_close(conn, lobj_fd);
}
@@ -134,6 +135,7 @@ overwrite(PGconn *conn, Oid lobjId, int start, int len)
break;
}
}
+ free(buf);
fprintf(stderr, "\n");
lo_close(conn, lobj_fd);
}