int ret;
ppd = GSF_get_peer_performance_data_ (mrp->peer);
+ GNUNET_assert (NULL == mrp->env);
mrp->env = GNUNET_MQ_msg_extra (msg,
block->size,
GNUNET_MESSAGE_TYPE_FS_PUT);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Preparing to push best content to peer %s\n",
GNUNET_i2s (GSF_connected_peer_get_identity2_(pos->peer)));
- if (GNUNET_YES == transmit_content (pos,
- mb))
+ if ( (NULL == pos->env) &&
+ (GNUNET_YES == transmit_content (pos,
+ mb)) ) {
break; /* 'mb' was freed! */
+ }
}
consider_gathering ();
}