tree-wide: Switch to autoptr for GOptionContext
We were leaking in a few places that I noticed in an ASAN run. Also, this was one of the last non-autoptr cleanup sections we have in `out:` cleanup sections, making us a lot closer to a potential full-tree rewrite to `return FALSE`. Closes: #624 Approved by: jlebon
This commit is contained in:
1 parent
5155662b57
commit
c19fae0282
48 files changed
+53
-160
No files matched your search
@@ -58,7 +58,7 @@ on_checksum_received (GObject *obj,
|
||||
gboolean
|
||||
ostree_builtin_checksum (int argc, char **argv, GCancellable *cancellable, GError **error)
|
||||
{
|
||||
GOptionContext *context;
|
||||
g_autoptr(GOptionContext) context = NULL;
|
||||
gboolean ret = FALSE;
|
||||
g_autoptr(GFile) f = NULL;
|
||||
AsyncChecksumData data = { 0, };
|
||||
@@ -87,7 +87,5 @@ ostree_builtin_checksum (int argc, char **argv, GCancellable *cancellable, GErro
|
||||
out:
|
||||
if (data.loop)
|
||||
g_main_loop_unref (data.loop);
|
||||
if (context)
|
||||
g_option_context_free (context);
|
||||
return ret;
|
||||
}
|
||||
Reference in new issue
Block a user