summaryrefslogtreecommitdiffstats
path: root/pcilib/pci.c
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-02-16 16:30:40 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-02-16 16:30:40 +0100
commited9d8f285f4d81e1ce8bb5e7a5b9e471a73c1590 (patch)
tree8b05ef6a4585b0d585f82c468cf92048a05f79ee /pcilib/pci.c
parentfc80d8b64672785b4d9c7127e852ca9bf19c9194 (diff)
downloadpcitool-ed9d8f285f4d81e1ce8bb5e7a5b9e471a73c1590.tar.gz
pcitool-ed9d8f285f4d81e1ce8bb5e7a5b9e471a73c1590.tar.bz2
pcitool-ed9d8f285f4d81e1ce8bb5e7a5b9e471a73c1590.tar.xz
pcitool-ed9d8f285f4d81e1ce8bb5e7a5b9e471a73c1590.zip
1. Add python thread initialization to pcilib_init_py()
-Fix pcilib_script_run_func() work in multithread mode 2. pcilib_close() - Move free_py() code after free views to make view destructors work properly 3. Move script hash to pcilib_py_s 4. Move pcilib_get_logger() pcilib_get_logger_min_prio() and pcilib_get_logger_argument() declarations to error.h 5. Refactor pcilib_get_value_as_pyobject pcilib_set_value_from_pyobject to more unified form 6. Add more memory checks. Fix some string memory allocations. 7. Refactor pcilib_py_s member names. 8. Merge pcilib_script_read() and pcilib_script_write() to pcilib_script_run_func() 9. Update test_pywrap views scripts
Diffstat (limited to 'pcilib/pci.c')
-rw-r--r--pcilib/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcilib/pci.c b/pcilib/pci.c
index c38097f..58ee4b0 100644
--- a/pcilib/pci.c
+++ b/pcilib/pci.c
@@ -306,8 +306,6 @@ void pcilib_close(pcilib_t *ctx) {
if (ctx->event_plugin)
pcilib_plugin_close(ctx->event_plugin);
-
- pcilib_free_py(ctx);
if (ctx->locks.kmem)
pcilib_free_locking(ctx);
@@ -349,6 +347,8 @@ void pcilib_close(pcilib_t *ctx) {
if (ctx->registers)
free(ctx->registers);
+
+ pcilib_free_py(ctx);
if (ctx->model)
free(ctx->model);