alpm: Fix a few potential double-frees

Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=84485