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:
1 parent
ff2010c8da
commit
87610799f2
1 file changed
+1
@@ -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