Version 1 was here: https://listman.redhat.com/archives/libguestfs/2023-February/030732.html
(Ignore version 2 which had a mistake, this is version 3) Following Eric's suggestion here: https://listman.redhat.com/archives/libguestfs/2023-February/030746.html let's decrement the reference of py_array right after adding it to the args. (This works even if args fails to be built). However the other part of Eric's suggestion is wrong as it ends up calling Py_DECREF (args) when args == NULL along the error path. This lead me to look more closely at this patch: https://listman.redhat.com/archives/libguestfs/2019-January/020346.html which I believe is wrong (at least, the part that fiddles with the reference to args). I cannot reproduce the original problem, nor can I find any justification by looking at the documentation of PyObject_CallObject. So we start by reverting that commit. This means we are only decrementing args once, and not allow the error path. I tested this with: - with the reproducer - with the reproducer and bbf396fc5 reverted - normal Python test suite Rich. _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs