From a4904ed2e437275bfd92828ad09fbb677d7225d1 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 17:32:54 +0200 Subject: free_peerlist now checks peer_list for NULL, so on alloc failure we don't dereference NULL --- ot_vector.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'ot_vector.c') diff --git a/ot_vector.c b/ot_vector.c index e3c3d3f..c4cd171 100644 --- a/ot_vector.c +++ b/ot_vector.c @@ -156,8 +156,6 @@ void vector_remove_torrent(ot_vector *vector, ot_torrent *match) { if (!vector->size) return; - /* If this is being called after a unsuccessful malloc() for peer_list - in add_peer_to_torrent, match->peer_list actually might be NULL */ free_peerlist(match->peer_list6); free_peerlist(match->peer_list4); -- cgit v1.3