-fix
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 19 Dec 2016 12:41:16 +0000 (13:41 +0100)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 19 Dec 2016 12:41:16 +0000 (13:41 +0100)
src/credential/gnunet-service-credential.c

index 55907e0d79946ee750bfd585663c1d9bbb817b35..942b3865260b0b97bfc2f40ecb4873de42cec1b0 100644 (file)
@@ -805,6 +805,15 @@ handle_credential_query (void* cls,
 
   vrh->lookup_request = NULL;
   cred_record_count = 0;
+
+  if (0 == rd_count)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "No credentials found\n");
+    send_lookup_response (vrh);
+    return;
+  }
+
   for (i=0; i < rd_count; i++)
   {
     if (GNUNET_GNSRECORD_TYPE_CREDENTIAL != rd[i].record_type)