diff options
author | Xiang Zhang <angwerzx@126.com> | 2017-03-22 12:25:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-22 12:25:51 +0800 |
commit | 827c78326aa850257ca40991b401b3db298c54fb (patch) | |
tree | ea99fdc1ad7b4948ba4fd02abc1dc60d38194154 | |
parent | 91f79db02acb9f82c738bb0b2f7bfc3260b90930 (diff) | |
download | cpython-git-827c78326aa850257ca40991b401b3db298c54fb.tar.gz |
bpo-29873: fix INCREF for possible NULL value in element_getattr() (GH-757)
-rw-r--r-- | Modules/_elementtree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index b01167b8a0..7a0aeda63c 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -1542,7 +1542,7 @@ element_getattr(ElementObject* self, char* name) return res; } else if (strcmp(name, "text") == 0) { res = element_get_text(self); - Py_INCREF(res); + Py_XINCREF(res); return res; } |