mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-23 09:23:43 +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. */
|
/* Store the object from future uses. */
|
||||||
if (can_cache && !cachedType) {
|
if (can_cache && !cachedType && decimalType) {
|
||||||
Py_INCREF(decimalType);
|
Py_INCREF(decimalType);
|
||||||
cachedType = decimalType;
|
cachedType = decimalType;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user