CID#18496 Resource leak

If getextattr_value_by_id returns an error, data isn't freed.
We have to free this buffer here since it's used and retained
later in the process (I first thought of putting it in the
out section but that would cause a segfault later).