This code is okay because it is immediately followed by a `return`, but I think it would be better as:

```c
ret = group->close(group);
group = NULL;
if (ret != 0)
    goto err;
```