mirror of
https://github.com/postgres/postgres.git
synced 2025-06-08 22:02:03 +03:00
ecpg: Fix rare memory leaks
found by Coverity
This commit is contained in:
parent
46c9f5d6f0
commit
6f59d42b94
@ -1776,6 +1776,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
|
|||||||
{
|
{
|
||||||
setlocale(LC_NUMERIC, oldlocale);
|
setlocale(LC_NUMERIC, oldlocale);
|
||||||
ecpg_free(oldlocale);
|
ecpg_free(oldlocale);
|
||||||
|
free_statement(stmt);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
@ -1807,6 +1808,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
|
|||||||
ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
|
ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
|
||||||
setlocale(LC_NUMERIC, oldlocale);
|
setlocale(LC_NUMERIC, oldlocale);
|
||||||
ecpg_free(oldlocale);
|
ecpg_free(oldlocale);
|
||||||
|
free_statement(stmt);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user