BUGFIX memory leaks
diff --git a/src/netopeerguid.c b/src/netopeerguid.c
index fde6598..26276ea 100644
--- a/src/netopeerguid.c
+++ b/src/netopeerguid.c
@@ -2395,7 +2395,7 @@
     if (json_object_object_get_ex(request, "strict", &obj) == FALSE) {
         pthread_mutex_unlock(&json_lock);
         reply = create_error_reply("Missing strict parameter.");
-        return reply;
+        goto finalize;
     }
     strict = json_object_get_boolean(obj);
     pthread_mutex_unlock(&json_lock);
@@ -2407,6 +2407,8 @@
         free(data);
     }
 
+finalize:
+    CHECK_AND_FREE(filter);
     return reply;
 }
 
@@ -2431,7 +2433,7 @@
     if (json_object_object_get_ex(request, "strict", &obj) == FALSE) {
         pthread_mutex_unlock(&json_lock);
         reply = create_error_reply("Missing strict parameter.");
-        return reply;
+        goto finalize;
     }
     strict = json_object_get_boolean(obj);
     pthread_mutex_unlock(&json_lock);