Browse Source

Use the piece destructor.

master
Richard Nyberg 19 years ago
parent
commit
d8720e889c
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      btpd/torrent.c

+ 2
- 6
btpd/torrent.c View File

@@ -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…
Cancel
Save