]> git.pld-linux.org Git - packages/libnl.git/blame - 0001-avoid-dangling-co_major_cache-reference-to-NL_AUTO_P.patch
- add patch from ntrack
[packages/libnl.git] / 0001-avoid-dangling-co_major_cache-reference-to-NL_AUTO_P.patch
CommitLineData
4d3447a9
AM
1From 8525e3a4082f88bc93f70c996577e2e48eb57d79 Mon Sep 17 00:00:00 2001
2From: Alexander Sack <asac@jwsdot.com>
3Date: Fri, 21 Oct 2011 00:31:39 +0200
4Subject: [PATCH] avoid dangling co_major_cache reference to NL_AUTO_PROVIDE
5 caches
6
7---
8 lib/cache_mngr.c | 7 +++++--
9 1 files changed, 5 insertions(+), 2 deletions(-)
10
11diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
12index cfa676b..69fd4aa 100644
13--- a/lib/cache_mngr.c
14+++ b/lib/cache_mngr.c
15@@ -372,9 +372,12 @@ void nl_cache_mngr_free(struct nl_cache_mngr *mngr)
16 if (mngr->cm_handle)
17 nl_close(mngr->cm_handle);
18
19- for (i = 0; i < mngr->cm_nassocs; i++)
20- if (mngr->cm_assocs[i].ca_cache)
21+ for (i = 0; i < mngr->cm_nassocs; i++) {
22+ if (mngr->cm_assocs[i].ca_cache) {
23+ nl_cache_mngt_unprovide(mngr->cm_assocs[i].ca_cache);
24 nl_cache_free(mngr->cm_assocs[i].ca_cache);
25+ }
26+ }
27
28 free(mngr->cm_assocs);
29 free(mngr);
30--
311.7.5.4
32
This page took 0.0444369999999999 seconds and 4 git commands to generate.