Skip to content

Commit 369ff15

Browse files
committed
Revert memory leak changes, causing issues with lsbfirst etc
1 parent baa9419 commit 369ff15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/spimodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ SPI_get_lsbfirst(SPI *self, void *closure)
404404
else
405405
result = Py_False;
406406

407+
Py_INCREF(result);
407408
return result;
408409
}
409410

@@ -417,6 +418,7 @@ SPI_get_3wire(SPI *self, void *closure)
417418
else
418419
result = Py_False;
419420

421+
Py_INCREF(result);
420422
return result;
421423
}
422424

@@ -430,6 +432,7 @@ SPI_get_loop(SPI *self, void *closure)
430432
else
431433
result = Py_False;
432434

435+
Py_INCREF(result);
433436
return result;
434437
}
435438

0 commit comments

Comments
 (0)