Commit 31c96a36 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

Fix a NULL dereference on unit test failure. CID 1353177.

parent 5cd6c577
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -434,8 +434,10 @@ test_routerlist_router_is_already_dir_fetching(void *arg)

 done:
  /* If a connection is never set up, connection_free chokes on it. */
  if (mocked_connection) {
    buf_free(mocked_connection->inbuf);
    buf_free(mocked_connection->outbuf);
  }
  tor_free(mocked_connection);
  UNMOCK(connection_get_by_type_addr_port_purpose);
}