summaryrefslogtreecommitdiffstats
path: root/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'pci.c')
-rw-r--r--pci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pci.c b/pci.c
index 3846235..d2d5843 100644
--- a/pci.c
+++ b/pci.c
@@ -401,8 +401,12 @@ void pcilib_close(pcilib_t *ctx) {
ctx->model_info.registers = pcilib_model[ctx->model].registers;
}
- while (ctx->kmem_list) {
- pcilib_free_kernel_memory(ctx, ctx->kmem_list);
+ if (ctx->kmem_list) {
+ pcilib_warning("Not all kernel buffers are properly cleaned");
+
+ while (ctx->kmem_list) {
+ pcilib_free_kernel_memory(ctx, ctx->kmem_list, 0);
+ }
}
for (i = 0; i < PCILIB_MAX_BANKS; i++) {