~ubuntu-branches/ubuntu/trusty/libnl3/trusty

« back to all changes in this revision

Viewing changes to debian/patches/0001-avoid-dangling-co_major_cache-reference-to-NL_AUTO_P.patch

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-01-09 15:33:38 UTC
  • Revision ID: package-import@ubuntu.com-20120109153338-dvzqfgd0um9s4h0t
Tags: 3.2.3-2ubuntu1
0001-avoid-dangling-co_major_cache-reference-to-NL_AUTO_P.patch:
avoid keeping a dangling co_major_cache reference to NL_AUTO_PROVIDE
caches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 8525e3a4082f88bc93f70c996577e2e48eb57d79 Mon Sep 17 00:00:00 2001
 
2
From: Alexander Sack <asac@jwsdot.com>
 
3
Date: Fri, 21 Oct 2011 00:31:39 +0200
 
4
Subject: [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
 
 
11
diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
 
12
index 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
-- 
 
31
1.7.5.4
 
32