Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2160?usp=email

to review the following change.


Change subject: openvpnserv: always free the domains in UndoDnsSearchDomains()
......................................................................

openvpnserv: always free the domains in UndoDnsSearchDomains()

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]>
---
M src/openvpnserv/interactive.c
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/2160/1

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;
 }

 /**

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2160?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idf378bb5af0b2b4e8d746e252159b756e96c37fb
Gerrit-Change-Number: 2160
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to