When cancelling out of an attempted install with conflicts, pkgin_install jumps to installend before downloadhead has a chance to be initialized. This causes a segfault within free_pkglist (at least, in NetBSD 9.99.73) as the lists are being cleaned up. Example:
# pkgin install rust
calculating dependencies...done.
rust-1.45.2nb2 (to be installed) conflicts with installed package rust-bin-1.46.0.
proceed ? [y/N] n
Memory fault (core dumped)
Initializing downloadhead as NULL at the start of pkgin_install resolves this.
When cancelling out of an attempted install with conflicts, pkgin_install jumps to installend before downloadhead has a chance to be initialized. This causes a segfault within free_pkglist (at least, in NetBSD 9.99.73) as the lists are being cleaned up. Example:
Initializing downloadhead as NULL at the start of pkgin_install resolves this.