mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-06-15 10:33:05 +03:00
Removed calls to PyMem_XXX when not holding the GIL
This commit is contained in:
parent
16c2a8fc81
commit
bd19e3148c
|
@ -54,7 +54,7 @@ conn_notice_callback(void *args, const char *message)
|
||||||
else {
|
else {
|
||||||
struct connectionObject_notice *notice =
|
struct connectionObject_notice *notice =
|
||||||
(struct connectionObject_notice *)
|
(struct connectionObject_notice *)
|
||||||
PyMem_Malloc(sizeof(struct connectionObject_notice));
|
malloc(sizeof(struct connectionObject_notice));
|
||||||
notice->message = strdup(message);
|
notice->message = strdup(message);
|
||||||
notice->next = self->notice_pending;
|
notice->next = self->notice_pending;
|
||||||
self->notice_pending = notice;
|
self->notice_pending = notice;
|
||||||
|
@ -99,7 +99,7 @@ conn_notice_clean(connectionObject *self)
|
||||||
tmp = notice;
|
tmp = notice;
|
||||||
notice = notice->next;
|
notice = notice->next;
|
||||||
free(tmp->message);
|
free(tmp->message);
|
||||||
PyMem_Free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->notice_pending = NULL;
|
self->notice_pending = NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user