Skip to content

Commit

Permalink
Merge pull request #54 from jluebbe/v0/topic/fix-install-args-free
Browse files Browse the repository at this point in the history
main: assure args->status_result is set before freeing args
  • Loading branch information
jluebbe committed Jun 16, 2016
2 parents 9fcd0c5 + ed99feb commit 943b11d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void on_installer_completed(GDBusProxy *proxy, gint result,
static gboolean install_start(int argc, char **argv)
{
RInstaller *installer = NULL;
RaucInstallArgs *args = install_args_new();
RaucInstallArgs *args = NULL;
GError *error = NULL;
gchar *bundlelocation = NULL, *bundlescheme = NULL;

Expand All @@ -105,7 +105,7 @@ static gboolean install_start(int argc, char **argv)
g_clear_pointer(&bundlescheme, g_free);
g_debug("input bundle: %s", bundlelocation);


args = install_args_new();
args->name = bundlelocation;
args->notify = install_notify;
args->cleanup = install_cleanup;
Expand Down Expand Up @@ -159,9 +159,9 @@ static gboolean install_start(int argc, char **argv)

g_signal_handlers_disconnect_by_data(installer, args);
g_clear_pointer(&installer, g_object_unref);
install_args_free(args);

out:
install_args_free(args);

return TRUE;
}
Expand Down

0 comments on commit 943b11d

Please sign in to comment.