summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-22 13:00:13 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-22 13:00:13 +0100
commitea07a6d7b2df9b09d8e4c796b2416a60ba90144a (patch)
tree4da04379875a9aa7f56b1375ffc1bd8918bf84d5
parent6229767a7d5b0d3cf3125f2e9da0ca0e66ada814 (diff)
Python Discovery: Copy over the version before freeing
-rw-r--r--wrappers/python/eduvpn_common/discovery.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wrappers/python/eduvpn_common/discovery.py b/wrappers/python/eduvpn_common/discovery.py
index 01f6e13..aa5a667 100644
--- a/wrappers/python/eduvpn_common/discovery.py
+++ b/wrappers/python/eduvpn_common/discovery.py
@@ -171,8 +171,9 @@ def get_disco_servers(lib: CDLL, ptr: c_void_p) -> Optional[DiscoServers]:
if current is None:
continue
servers.append(current)
+ disco_version = svrs.version
lib.FreeDiscoServers(ptr)
- return DiscoServers(svrs.version, servers)
+ return DiscoServers(disco_version, servers)
return None
@@ -196,6 +197,7 @@ def get_disco_organizations(lib: CDLL, ptr: c_void_p) -> Optional[DiscoOrganizat
if current is None:
continue
organizations.append(current)
+ disco_version = orgs.version
lib.FreeDiscoOrganizations(ptr)
- return DiscoOrganizations(orgs.version, organizations)
+ return DiscoOrganizations(disco_version, organizations)
return None