8000 Fix possible refleak in PathGenerator. · matplotlib/matplotlib@4646515 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 4646515

Browse files
committed
Fix possible refleak in PathGenerator.
If one calls set() twice on the same PathGenerator, the first m_paths needs to be decref'd. (We don't actually ever call set twice, I think, but stil...)
1 parent a26f9a3 commit 4646515

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/py_adaptors.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ class PathGenerator
212212
return 0;
213213
}
214214

215+
Py_XDECREF(m_paths);
215216
m_paths = obj;
216217
Py_INCREF(m_paths);
217218

0 commit comments

Comments
 (0)
0