瀏覽代碼

Use the piece destructor.

master
Richard Nyberg 20 年之前
父節點
當前提交
d8720e889c
共有 1 個檔案被更改,包括 2 行新增6 行删除
  1. +2
    -6
      btpd/torrent.c

+ 2
- 6
btpd/torrent.c 查看文件

@@ -171,12 +171,8 @@ torrent_unload(struct torrent *tp)
peer = next;
}

piece = BTPDQ_FIRST(&tp->getlst);
while (piece != NULL) {
struct piece *next = BTPDQ_NEXT(piece, entry);
free(piece);
piece = next;
}
while ((piece = BTPDQ_FIRST(&tp->getlst)) != NULL)
piece_free(piece);

free(tp->piece_count);
free(tp->busy_field);


Loading…
取消
儲存