Fix small memory leak in ecpglib ecpg_update_declare_statement() is called the
second time. Author: "Zhang, Jie" <zhangjie2@cn.fujitsu.com>
This commit is contained in:
parent
cf665ad4c8
commit
58006f8041
@ -754,8 +754,12 @@ ecpg_update_declare_statement(const char *declared_name, const char *cursor_name
|
|||||||
/* Find the declared node by declared name */
|
/* Find the declared node by declared name */
|
||||||
p = ecpg_find_declared_statement(declared_name);
|
p = ecpg_find_declared_statement(declared_name);
|
||||||
if (p)
|
if (p)
|
||||||
|
{
|
||||||
|
if (p->cursor_name)
|
||||||
|
ecpg_free(p->cursor_name);
|
||||||
p->cursor_name = ecpg_strdup(cursor_name, lineno);
|
p->cursor_name = ecpg_strdup(cursor_name, lineno);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find and return the connection name referred by the declared name
|
* Find and return the connection name referred by the declared name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user