about summary refs log tree commit diff
path: root/btpd/download_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'btpd/download_subr.c')
-rw-r--r--btpd/download_subr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/btpd/download_subr.c b/btpd/download_subr.c
index 282a516..9164e72 100644
--- a/btpd/download_subr.c
+++ b/btpd/download_subr.c
@@ -278,6 +278,7 @@ struct piece *
 dl_new_piece(struct net *n, uint32_t index)
 {
     btpd_log(BTPD_L_POL, "Started on piece %u.\n", index);
+    cm_prealloc(n->tp, index);
     return piece_alloc(n, index);
 }