Skip to content

Commit e9fd73c

Browse files
committed
Fix from Peter for BLOBs
1 parent ba977c0 commit e9fd73c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/tcop/fastpath.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.10 1998/01/07 21:05:54 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.11 1998/01/11 21:16:01 scrappy Exp $
1111
*
1212
* NOTES
1313
* This cruft is the server side of PQfn.
@@ -326,7 +326,7 @@ HandleFunctionRequest()
326326
{ /* by-reference ... */
327327
if (fip->arglen[i] < 0)
328328
{ /* ... varlena */
329-
if (!(p = palloc(argsize + VARHDRSZ)))
329+
if (!(p = palloc(argsize + VARHDRSZ + 1))) /* Added +1 to solve memory leak - Peter 98 Jan 6 */
330330
{
331331
elog(ERROR, "HandleFunctionRequest: palloc failed");
332332
}

0 commit comments

Comments
 (0)