pgpool2.git / summary / log / commit / refs

commit    c080f58a6450687e0376b5b83ce71b5d75e07390
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Fri Sep 28 02:35:24 2012 +0000

    Fix possible memory leak in nodeToString(). Since the memory context
    could be session context, memory used for String object may be
    considerable if user session continues for hours or days.
    See bug track #24 for more details.


parser/outfuncs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parser/outfuncs.c b/parser/outfuncs.c index d1a76f86c..025b1298a 100644 --- a/parser/outfuncs.c +++ b/parser/outfuncs.c @@ -5618,5 +5618,8 @@ nodeToString(void *obj) p = palloc(str->len+1); memcpy(p, str->data, str->len); *(p+str->len) = '\0'; + + free_string(str); + return p; } [parent: 8a62c4dbb387]