refs: Add a missing `goto out` for error handling

If the `refs/remotes` directory doesn't exist, we'd trip an assertion.
This commit is contained in:
Colin Walters 2016-01-26 16:48:37 -05:00
parent cd0a9d3435
commit 91a1f91440
1 changed files with 2 additions and 0 deletions

View File

@ -551,6 +551,8 @@ ostree_repo_list_refs (OstreeRepo *self,
remote_enumerator = g_file_enumerate_children (self->remote_heads_dir, OSTREE_GIO_FAST_QUERYINFO, remote_enumerator = g_file_enumerate_children (self->remote_heads_dir, OSTREE_GIO_FAST_QUERYINFO,
0, 0,
cancellable, error); cancellable, error);
if (!remote_enumerator)
goto out;
while (TRUE) while (TRUE)
{ {