Commit e72489e1 authored by Michael Meskes's avatar Michael Meskes

Fix small memory leak in ecpglib ecpg_update_declare_statement() is called the

second time.

Author: "Zhang, Jie" <zhangjie2@cn.fujitsu.com>
parent 8372e3c9
......@@ -754,7 +754,11 @@ ecpg_update_declare_statement(const char *declared_name, const char *cursor_name
/* Find the declared node by declared name */
p = ecpg_find_declared_statement(declared_name);
if (p)
{
if (p->cursor_name)
ecpg_free(p->cursor_name);
p->cursor_name = ecpg_strdup(cursor_name, lineno);
}
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment