mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +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 {
|
||||
struct connectionObject_notice *notice =
|
||||
(struct connectionObject_notice *)
|
||||
PyMem_Malloc(sizeof(struct connectionObject_notice));
|
||||
malloc(sizeof(struct connectionObject_notice));
|
||||
notice->message = strdup(message);
|
||||
notice->next = self->notice_pending;
|
||||
self->notice_pending = notice;
|
||||
|
@ -99,7 +99,7 @@ conn_notice_clean(connectionObject *self)
|
|||
tmp = notice;
|
||||
notice = notice->next;
|
||||
free(tmp->message);
|
||||
PyMem_Free(tmp);
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
self->notice_pending = NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user