[ovs-dev] [PATCH] ovs-thread: Fix memory leak in thread exit.
Ben Pfaff
blp at ovn.org
Tue Nov 10 21:50:58 UTC 2015
diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c
index 88b92d1..2f6bc58 100644
--- a/lib/ovs-thread.c
+++ b/lib/ovs-thread.c
@@ -665,7 +665,7 @@ ovsthread_key_destruct__(void *slots_)
n = n_keys;
ovs_mutex_unlock(&key_mutex);
- for (i = 0; i < n / L2_SIZE; i++) {
+ for (i = 0; i < DIV_ROUND_UP(n, L2_SIZE); i++) {
free(slots->p1[i]);
}
free(slots);
--
2.1.3
More information about the dev
mailing list