diff options
author | Matt Wilson <msw@redhat.com> | 1999-08-07 20:39:42 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-08-07 20:39:42 +0000 |
commit | 4c9fe01e9831e55a69abd7395423e3e925dab160 (patch) | |
tree | 02d492282717e80dd374e053930dbf9580da3889 /rpmmodule | |
parent | fe528ed46a55707e8be4dee426b8c96dbed55773 (diff) | |
download | anaconda-4c9fe01e9831e55a69abd7395423e3e925dab160.tar.gz anaconda-4c9fe01e9831e55a69abd7395423e3e925dab160.tar.xz anaconda-4c9fe01e9831e55a69abd7395423e3e925dab160.zip |
proper rpmmodule fd closes
Diffstat (limited to 'rpmmodule')
-rw-r--r-- | rpmmodule/rpmmodule.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rpmmodule/rpmmodule.c b/rpmmodule/rpmmodule.c index 6b8d8a463..5578483b2 100644 --- a/rpmmodule/rpmmodule.c +++ b/rpmmodule/rpmmodule.c @@ -910,7 +910,7 @@ static void * tsCallback(const Header h, const rpmCallbackType what, struct tsCallbackType * cbInfo = data; PyObject * args, * result; int fd; - FD_t fdt; + static FD_t fdt; if (cbInfo->pythonError) return NULL; @@ -931,11 +931,14 @@ static void * tsCallback(const Header h, const rpmCallbackType what, return NULL; } fdt = fdDup(fd); - close(fd); Py_DECREF(result); return fdt; } + if (what == RPMCALLBACK_INST_CLOSE_FILE) { + fdClose (fdt); + } + Py_DECREF(result); return NULL; |