Sfoglia il codice sorgente

Use the piece destructor.

master
Richard Nyberg 19 anni fa
parent
commit
d8720e889c
1 ha cambiato i file con 2 aggiunte e 6 eliminazioni
  1. +2
    -6
      btpd/torrent.c

+ 2
- 6
btpd/torrent.c Vedi 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…
Annulla
Salva