From: Razvan Cojocaru <[email protected]>
The domains string was only freed when the search list key could be
opened. Free it unconditionally, as the caller frees the undo data
right after.
Broken since ae90cbad ("dns: support multiple domains without DHCP").
Change-Id: Idf378bb5af0b2b4e8d746e252159b756e96c37fb
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Antonio Quartulli <[email protected]>
Acked-by: Heiko Hund <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2160
---
This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2160
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Antonio Quartulli <[email protected]>
Heiko Hund <[email protected]>
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 81205d6..710a797 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -1754,10 +1754,10 @@
RemoveDnsSearchDomains(dns_searchlist_key, undo_data->domains);
RegCloseKey(dns_searchlist_key);
ApplyDnsSettings(gpol);
-
- free(undo_data->domains);
- undo_data->domains = NULL;
}
+
+ free(undo_data->domains);
+ undo_data->domains = NULL;
}
/**
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel