From 5beef38bfc6b53eca3675c31fc635e589d99132b Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Mon, 5 May 2008 14:16:57 +0800 Subject: [PATCH] Fix double free in case where PGresult is NULL. --- psycopg/pqpath.c | 1 - 1 file changed, 1 deletion(-) diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index afab3b1d..5c8d3c76 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -348,7 +348,6 @@ pq_complete_error(connectionObject *conn, PGresult **pgres, char **error) pq_raise(conn, NULL, *pgres); else if (*error != NULL) { PyErr_SetString(OperationalError, *error); - free(*error); } else { PyErr_SetString(OperationalError, "unknown error"); }