mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 10:23:43 +03:00
Merge branch 'client-encoding-leak'
This commit is contained in:
commit
d0216ce68d
7
NEWS
7
NEWS
|
@ -1,6 +1,13 @@
|
|||
Current release
|
||||
---------------
|
||||
|
||||
What's new in psycopg 2.8.6
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Fixed memory leak changing connection encoding to the current one
|
||||
(:ticket:`#1101`).
|
||||
|
||||
|
||||
What's new in psycopg 2.8.5
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -1389,7 +1389,10 @@ conn_set_client_encoding(connectionObject *self, const char *pgenc)
|
|||
|
||||
/* If the current encoding is equal to the requested one we don't
|
||||
issue any query to the backend */
|
||||
if (strcmp(self->encoding, clean_enc) == 0) return 0;
|
||||
if (strcmp(self->encoding, clean_enc) == 0) {
|
||||
res = 0;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
pthread_mutex_lock(&self->lock);
|
||||
|
|
Loading…
Reference in New Issue
Block a user