mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-23 09:23:43 +03:00
Fix double free in case where PGresult is NULL.
This commit is contained in:
parent
ec20fa8912
commit
5beef38bfc
|
@ -348,7 +348,6 @@ pq_complete_error(connectionObject *conn, PGresult **pgres, char **error)
|
||||||
pq_raise(conn, NULL, *pgres);
|
pq_raise(conn, NULL, *pgres);
|
||||||
else if (*error != NULL) {
|
else if (*error != NULL) {
|
||||||
PyErr_SetString(OperationalError, *error);
|
PyErr_SetString(OperationalError, *error);
|
||||||
free(*error);
|
|
||||||
} else {
|
} else {
|
||||||
PyErr_SetString(OperationalError, "unknown error");
|
PyErr_SetString(OperationalError, "unknown error");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user