Skip to content

Commit 58006f8

Browse files
author
Michael Meskes
committed
Fix small memory leak in ecpglib ecpg_update_declare_statement() is called the
second time. Author: "Zhang, Jie" <zhangjie2@cn.fujitsu.com>
1 parent cf665ad commit 58006f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/interfaces/ecpg/ecpglib/prepare.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,11 @@ ecpg_update_declare_statement(const char *declared_name, const char *cursor_name
754754
/* Find the declared node by declared name */
755755
p = ecpg_find_declared_statement(declared_name);
756756
if (p)
757+
{
758+
if (p->cursor_name)
759+
ecpg_free(p->cursor_name);
757760
p->cursor_name = ecpg_strdup(cursor_name, lineno);
761+
}
758762
}
759763

760764
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy