From b84788debc08f64a0cb75cbb1059a6b222c51490 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Wed, 22 Sep 2004 05:12:45 +0000 Subject: Minor cleanup of libpq/LO examples: fix some memory leaks, update a comment or two. --- src/test/examples/testlo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/test/examples/testlo.c') diff --git a/src/test/examples/testlo.c b/src/test/examples/testlo.c index 2d5db3a5c2..988b51171a 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); } -- cgit v1.2.1