Description
Describe the bug
During module initialization, the call to macro import_array
will return NULL
directly on failure, which will make the created module leaked without decreasing its refcnt.
Bug path trace
move_template.c
-
Module is created, pointed to by
m
.
bottleneck/bottleneck/src/move_template.c
Line 1504 in f2bc792
-
Assume
m
is notNULL
.
bottleneck/bottleneck/src/move_template.c
Line 1508 in f2bc792
-
Invoke macro
import_array
, assume error happens andNULL
is returned directly.
bottleneck/bottleneck/src/move_template.c
Line 1509 in f2bc792
-
The module pointed to by
m
leaks without decreasing its refcnt.
Similarly, it is the same symptom in another three files.
-
nonreduce_axis_template.c
-
nonreduce_template.c
-
reduce_template.c
bottleneck/bottleneck/src/reduce_template.c
Line 2545 in f2bc792
bottleneck/bottleneck/src/reduce_template.c
Line 2549 in f2bc792
bottleneck/bottleneck/src/reduce_template.c
Line 2550 in f2bc792
Version
Static analysis carried out on commit f2bc792.