Skip to content

Commit

Permalink
deploy: Don't leak file descriptor passed for local rebases
Browse files Browse the repository at this point in the history
Came up in #2210
  • Loading branch information
cgwalters authored and openshift-merge-robot committed Aug 28, 2020
1 parent 122718c commit 5ff769f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/daemon/rpmostreed-transaction-types.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ deploy_transaction_finalize (GObject *object)
g_clear_pointer (&self->override_replace_local_pkgs, g_object_unref);
g_free (self->override_remove_pkgs);
g_free (self->override_reset_pkgs);
glnx_close_fd (&self->local_repo_remote_dfd);

G_OBJECT_CLASS (deploy_transaction_parent_class)->finalize (object);
}
Expand Down Expand Up @@ -981,6 +982,7 @@ deploy_transaction_execute (RpmostreedTransaction *transaction,
/* as far as the rest of the code is concerned, we're rebasing to :SHA256 now */
g_clear_pointer (&self->refspec, g_free);
self->refspec = g_strdup_printf (":%s", rev);
glnx_close_fd (&self->local_repo_remote_dfd);
}

g_autofree gchar *new_refspec = NULL;
Expand Down

0 comments on commit 5ff769f

Please sign in to comment.