Skip to content

BUG: Memory leak bugs due to returned new reference is not decreased on failure (static analyzer reports) #35

@Snape3058

Description

@Snape3058

Returning a new reference here:

pyxattr/xattr.c

Line 632 in c3466e7

my_tuple = Py_BuildValue("yy#", name, buf_val, nval);

Variable my_tuple goes out of scope without decreasing the refcnt.

pyxattr/xattr.c

Line 639 in c3466e7

goto free_buf_val;

Internal Report ID: 19f80b


Returning a new reference here:

pyxattr/xattr.c

Line 1185 in c3466e7

PyObject *m = PyModule_Create(&xattrmodule);

Error handling code after goto target does not decrease the refcnt. (also other gotos in this function)

pyxattr/xattr.c

Line 1201 in c3466e7

goto err_out;

Internal Report ID: 1eed62

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions