From: Philip Withnall Date: Tue, 24 Oct 2017 14:26:49 +0000 (+0100) Subject: lib/repo-finder-mount: Fix propagating NULL errors X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~30^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=886a5d79280b92d336a4eecc9da287fa8b697542;p=ostree.git lib/repo-finder-mount: Fix propagating NULL errors These two code paths tried to propagate errors which had never been set. Set new errors instead. Signed-off-by: Philip Withnall Closes: #1303 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-finder-mount.c b/src/libostree/ostree-repo-finder-mount.c index b41c2c8c..bae3664e 100644 --- a/src/libostree/ostree-repo-finder-mount.c +++ b/src/libostree/ostree-repo-finder-mount.c @@ -235,8 +235,7 @@ scan_repo (int dfd, { g_debug ("Ignoring repository ‘%s’ on mount ‘%s’ as it’s on a different file system from the mount", path, mount_name); - g_propagate_error (error, g_steal_pointer (&local_error)); - return FALSE; + return glnx_throw (error, "Repository is on a different file system from the mount"); } /* Exclude repositories which resolve to @parent_repo. */ @@ -245,8 +244,7 @@ scan_repo (int dfd, { g_debug ("Ignoring repository ‘%s’ on mount ‘%s’ as it is the same as the one we are resolving", path, mount_name); - g_propagate_error (error, g_steal_pointer (&local_error)); - return FALSE; + return glnx_throw (error, "Repository is the same as the one we are resolving"); } /* List the repo’s refs and return them. */