android: Properly deinit library if parsing an IP fails

This can happen with empty strings, which might be set for managed
profiles, which caused the refcounting to be askew and the resolver not
to work after connecting once because it was flushed and disabled.
This commit is contained in:
Tobias Brunner
2025-02-18 14:12:43 +01:00
parent ff2010c8da
commit 87610799f2
@@ -820,6 +820,7 @@ JNI_METHOD_P(org_strongswan_android_utils, Utils, parseInetAddressBytes, jbyteAr
host = host_create_from_string(str, 0);
if (!host)
{
library_deinit();
free(str);
return NULL;
}