mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Fixed potential NULL incref
This commit is contained in:
parent
1b27820389
commit
7d67ecbed3
|
@ -710,7 +710,7 @@ psyco_GetDecimalType(void)
|
|||
}
|
||||
|
||||
/* Store the object from future uses. */
|
||||
if (can_cache && !cachedType) {
|
||||
if (can_cache && !cachedType && decimalType) {
|
||||
Py_INCREF(decimalType);
|
||||
cachedType = decimalType;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user