From 304d2d90266066fff4d3fd384d8146d4276c7d7e Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 5 Aug 2019 15:54:58 +0200 Subject: [PATCH] Prevent crash --- app/src/main/jni/netguard/netguard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/jni/netguard/netguard.c b/app/src/main/jni/netguard/netguard.c index b39d7bf7..51add913 100644 --- a/app/src/main/jni/netguard/netguard.c +++ b/app/src/main/jni/netguard/netguard.c @@ -387,7 +387,8 @@ Java_eu_faircode_netguard_Util_is_1numeric_1address(JNIEnv *env, jclass type, js else numeric = (jboolean) (result != NULL); - freeaddrinfo(result); + if (result != NULL) + freeaddrinfo(result); (*env)->ReleaseStringUTFChars(env, ip_, ip); ng_delete_alloc(ip, __FILE__, __LINE__);