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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user