src: Fix two apparent double free