From: Colin Walters Date: Thu, 8 Dec 2016 15:01:35 +0000 (-0500) Subject: [ASAN] sysroot: Squash a leak in lockfile acquisition X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~42^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=58e318d678c8bd72b536a187fe2523fc114515d9;p=ostree.git [ASAN] sysroot: Squash a leak in lockfile acquisition I installed `parallel` in my dev container, which got me the sysroot locking tests, which caught this leak when built with ASAN. Closes: #623 Approved by: jlebon --- diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index 70ce1567..f50e34bd 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -1323,7 +1323,7 @@ ostree_sysroot_try_lock (OstreeSysroot *self, GError **error) { gboolean ret = FALSE; - GError *local_error = NULL; + g_autoptr(GError) local_error = NULL; if (!ensure_sysroot_fd (self, error)) goto out; @@ -1338,7 +1338,7 @@ ostree_sysroot_try_lock (OstreeSysroot *self, } else { - g_propagate_error (error, local_error); + g_propagate_error (error, g_steal_pointer (&local_error)); goto out; } }