PR/334: don't try to free the magic list if it was not allocated, since this
is an error.