From 78348fa296dc03c366a08f40aaa90565f5743158 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 31 Jul 2017 09:30:09 -0400 Subject: [PATCH] bin/refs: Fix error handling logic Spotted by Coverity. Coverity CID: 1452202 Closes: #1037 Approved by: jlebon --- src/ostree/ot-builtin-refs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c index 19420842..f2274802 100644 --- a/src/ostree/ot-builtin-refs.c +++ b/src/ostree/ot-builtin-refs.c @@ -264,7 +264,8 @@ ostree_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError ** goto out; } - ret = do_ref (repo, NULL, cancellable, error); + if (!do_ref (repo, NULL, cancellable, error)) + goto out; } ret = TRUE;