diff options
author | 2012-12-22 17:20:36 -0500 | |
---|---|---|
committer | 2012-12-22 17:20:36 -0500 | |
commit | 6142ff60fa04002dfab85e1499ff5adc7c5a03f4 (patch) | |
tree | 8c45ea12724725ead2685a9cb8b0d6cae22ca7a4 /scripts | |
parent | scripts/migrate-pax: add delete XATTR_PAX on all system ELF objects (diff) | |
download | elfix-6142ff60fa04002dfab85e1499ff5adc7c5a03f4.tar.gz elfix-6142ff60fa04002dfab85e1499ff5adc7c5a03f4.tar.bz2 elfix-6142ff60fa04002dfab85e1499ff5adc7c5a03f4.zip |
scripts/paxmodule.c: add important close(fd) in deletextpax()
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/migrate-pax | 2 | ||||
-rw-r--r-- | scripts/paxmodule.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/scripts/migrate-pax b/scripts/migrate-pax index d5bc03a..1d5c2f7 100755 --- a/scripts/migrate-pax +++ b/scripts/migrate-pax @@ -78,7 +78,7 @@ def main(): opt_count += 1 elif o == '-d': do_deleteall = True - opt_cout += 1 + opt_count += 1 elif o == '-h': do_usage = True opt_count += 1 diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c index 26d00ce..469e0cb 100644 --- a/scripts/paxmodule.c +++ b/scripts/paxmodule.c @@ -665,9 +665,13 @@ pax_deletextpax(PyObject *self, PyObject *args) } if( !fremovexattr(fd, PAX_NAMESPACE) ) + { + close(fd); return Py_BuildValue(""); + } else { + close(fd); PyErr_SetString(PaxError, "pax_deletextpax: fremovexattr() failed"); return NULL; } |