summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2020-11-01 10:20:02 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2020-11-01 10:20:02 -0800
commitc84d3f77abdb5502140ba36137c25a6dd07df756 (patch)
treed18fb366689d8cfd56cefaffe516585518b25c19
parent9505d391c72c90635453cc160b6f64e02da6a318 (diff)
doneAddrs: reset addrs to NULL after freeing list
Resolves warning from Oracle Parfait static analyzer: Warning: Dangling pointer Dangling pointer [dangling-pointer]: Invalid pointer is accessible to caller via global addrs at line 664 of xdm/auth.c in function 'doneAddrs'. Invalid pointer accessible via global addrs at line 646 a accessed from addrs at line 658 in function 'doneAddrs' a freed with free at line 662 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xdm/auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xdm/auth.c b/xdm/auth.c
index e24a5b9..07dd836 100644
--- a/xdm/auth.c
+++ b/xdm/auth.c
@@ -661,6 +661,7 @@ doneAddrs (void)
free (a->number);
free (a);
}
+ addrs = NULL;
}
static int checkEntry (Xauth *auth);