~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to debian/patches/autofs-5.0.5-fix-null-cache-clean.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
autofs-5.0.5 - fix null cache clean
2
 
 
3
 
From: Ian Kent <raven@themaw.net>
4
 
 
5
 
A function to clean the null map entry cache was added to
6
 
avoid a race when re-reading the master map. That function
7
 
mistakenly fails to clear the hash bucket array entries
8
 
which leads to a segmentation fault on the next null cache
9
 
lookup.
10
 
---
11
 
 
12
 
 CHANGELOG   |    1 +
13
 
 lib/cache.c |    1 +
14
 
 2 files changed, 2 insertions(+), 0 deletions(-)
15
 
 
16
 
 
17
 
diff --git a/CHANGELOG b/CHANGELOG
18
 
index b3e423b..f51e93b 100644
19
 
--- a/CHANGELOG
20
 
+++ b/CHANGELOG
21
 
@@ -65,6 +65,7 @@
22
 
 - fix paged ldap map read.
23
 
 - fix next task list update.
24
 
 - fix stale map read.
25
 
+- fix null cache clean.
26
 
 
27
 
 03/09/2009 autofs-5.0.5
28
 
 -----------------------
29
 
diff --git a/lib/cache.c b/lib/cache.c
30
 
index a096150..9acf736 100644
31
 
--- a/lib/cache.c
32
 
+++ b/lib/cache.c
33
 
@@ -249,6 +249,7 @@ void cache_clean_null_cache(struct mapent_cache *mc)
34
 
                        free(me->key);
35
 
                        free(me);
36
 
                }
37
 
+               mc->hash[i] = NULL;
38
 
        }
39
 
 
40
 
        return;