]> git.pld-linux.org Git - packages/autofs.git/blob - autofs-5.0.4-fix-incorrect-dclist-free.patch
- updated to 5.0.5, nfy.
[packages/autofs.git] / autofs-5.0.4-fix-incorrect-dclist-free.patch
1 autofs-5.0.4 - fix incorrect dclist free
2
3 From: Ian Kent <raven@themaw.net>
4
5 We incorrectly try to free dclist in modules/lookup_ldap.c:find_server().
6 ---
7
8  modules/lookup_ldap.c |   10 ++++++++--
9  1 files changed, 8 insertions(+), 2 deletions(-)
10
11
12 diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
13 index f6b3f42..8f352d6 100644
14 --- a/modules/lookup_ldap.c
15 +++ b/modules/lookup_ldap.c
16 @@ -688,6 +688,10 @@ static LDAP *find_server(unsigned logopt, struct lookup_context *ctxt)
17                         }
18                 }
19                 if (!uri) {
20 +                       if (dclist) {
21 +                               free_dclist(dclist);
22 +                               dclist = NULL;
23 +                       }
24                         p = p->next;
25                         continue;
26                 }
27 @@ -700,8 +704,10 @@ static LDAP *find_server(unsigned logopt, struct lookup_context *ctxt)
28                 }
29                 free(uri);
30                 uri = NULL;
31 -               free_dclist(dclist);
32 -               dclist = NULL;
33 +               if (dclist) {
34 +                       free_dclist(dclist);
35 +                       dclist = NULL;
36 +               }
37                 p = p->next;
38         }
39  
This page took 0.109833 seconds and 3 git commands to generate.