Skip to content

Commit d322082

Browse files
Xeonacidauvipy
authored andcommitted
Fix casting from PyObject* to int for PyRabbitMQ_ConnectionType_init
1 parent ff1d96a commit d322082

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/_librabbitmq/connection.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,8 @@ PyRabbitMQ_ConnectionType_init(PyRabbitMQ_Connection *self,
10811081
self->virtual_host = PyMem_Malloc(strlen(virtual_host) + 1);
10821082

10831083
if (self->hostname == NULL || self->userid == NULL || self->password == NULL || self->virtual_host == NULL) {
1084-
return PyErr_NoMemory();
1084+
PyErr_NoMemory();
1085+
return 0;
10851086
}
10861087

10871088
strcpy(self->hostname, hostname);

0 commit comments

Comments
 (0)