fixing leak
authorChristian Grothoff <christian@grothoff.org>
Fri, 11 Jun 2010 13:51:47 +0000 (13:51 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 11 Jun 2010 13:51:47 +0000 (13:51 +0000)
src/fs/fs.c

index e4e81635ae6ace4e8218aaec8b8a569fe285aace..9797becadedf61cab356c35b19ca9aa3807a946a 100644 (file)
@@ -2264,6 +2264,15 @@ deserialize_search_result (void *cls,
                                     &sr->key,
                                     sr,
                                     GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+  if (GNUNET_OK !=
+      GNUNET_BIO_read_close (rh, &emsg))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                 _("Failure while resuming search operation `%s': %s\n"),
+                 filename,
+                 emsg);
+      GNUNET_free (emsg);
+    }
   return GNUNET_OK;
  cleanup:
   GNUNET_free_non_null (download);
@@ -2275,6 +2284,15 @@ deserialize_search_result (void *cls,
     GNUNET_CONTAINER_meta_data_destroy (sr->meta);
   GNUNET_free (sr->serialization);
   GNUNET_free (sr);  
+  if (GNUNET_OK !=
+      GNUNET_BIO_read_close (rh, &emsg))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                 _("Failure while resuming search operation `%s': %s\n"),
+                 filename,
+                 emsg);
+      GNUNET_free (emsg);
+    }
   return GNUNET_OK;
 }