bpo-40429: PyFrame_GetCode() now returns a strong reference (GH-19773)

diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 6b3559e..533186b 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1237,5 +1237,6 @@
     assert(frame != NULL);
     PyCodeObject *code = frame->f_code;
     assert(code != NULL);
+    Py_INCREF(code);
     return code;
 }