summaryrefslogtreecommitdiffstats
path: root/main/ipsec-tools/02-fix-xauth-double-free-on-reload.patch
blob: af3f7468bebb1b9e166da24fc8b08671e44e9efa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/src/racoon/isakmp_xauth.c	15 Nov 2011 13:51:23 -0000	1.24
+++ b/src/racoon/isakmp_xauth.c	5 Feb 2013 06:21:03 -0000
@@ -458,10 +458,14 @@
 			vfree(xauth_rad_config.acct_server_list[i].host);
 			vfree(xauth_rad_config.acct_server_list[i].secret);
 		}
-		if (radius_auth_state != NULL)
+		if (radius_auth_state != NULL) {
 			rad_close(radius_auth_state);
-		if (radius_acct_state != NULL)
+			radius_auth_state = NULL;
+		}
+		if (radius_acct_state != NULL) {
 			rad_close(radius_acct_state);
+			radius_acct_state = NULL;
+		}
 	}
 
 	/* initialize radius config */