[c] double free or corruption (!prev) error in c program