Backport a patch to fix a gnome-software crash when installing flatpaks
https://bugzilla.redhat.com/show_bug.cgi?id=1497642
This commit is contained in:
		
							parent
							
								
									bd78dc262e
								
							
						
					
					
						commit
						7fa01992fc
					
				| @ -0,0 +1,41 @@ | |||||||
|  | From 176a7b4778fbacbbb0824cf8c612656cd0985499 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Kalev Lember <klember@redhat.com> | ||||||
|  | Date: Tue, 7 Nov 2017 16:10:45 +0100 | ||||||
|  | Subject: [PATCH] fetcher/curl: Fix invalid memory access in finalize() | ||||||
|  | 
 | ||||||
|  | Reorder cleanup functions so that curl_multi_cleanup() runs before | ||||||
|  | self->sockets is destroyed. This avoids an assert and invalid memory | ||||||
|  | access in sock_cb where self->sockets is dereferenced during | ||||||
|  | curl_multi_cleanup(). | ||||||
|  | 
 | ||||||
|  | Closes: https://github.com/ostreedev/ostree/issues/1331 | ||||||
|  | 
 | ||||||
|  | Closes: #1332 | ||||||
|  | Approved by: cgwalters | ||||||
|  | ---
 | ||||||
|  |  src/libostree/ostree-fetcher-curl.c | 2 +- | ||||||
|  |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c
 | ||||||
|  | index 1f64188258ed..8a23b16361ef 100644
 | ||||||
|  | --- a/src/libostree/ostree-fetcher-curl.c
 | ||||||
|  | +++ b/src/libostree/ostree-fetcher-curl.c
 | ||||||
|  | @@ -167,6 +167,7 @@ _ostree_fetcher_finalize (GObject *object)
 | ||||||
|  |  { | ||||||
|  |    OstreeFetcher *self = OSTREE_FETCHER (object); | ||||||
|  |   | ||||||
|  | +  curl_multi_cleanup (self->multi);
 | ||||||
|  |    g_free (self->remote_name); | ||||||
|  |    g_free (self->cookie_jar_path); | ||||||
|  |    g_free (self->proxy); | ||||||
|  | @@ -177,7 +178,6 @@ _ostree_fetcher_finalize (GObject *object)
 | ||||||
|  |    g_clear_pointer (&self->timer_event, (GDestroyNotify)destroy_and_unref_source); | ||||||
|  |    if (self->mainctx) | ||||||
|  |      g_main_context_unref (self->mainctx); | ||||||
|  | -  curl_multi_cleanup (self->multi);
 | ||||||
|  |   | ||||||
|  |    G_OBJECT_CLASS (_ostree_fetcher_parent_class)->finalize (object); | ||||||
|  |  } | ||||||
|  | -- 
 | ||||||
|  | 2.14.2 | ||||||
|  | 
 | ||||||
| @ -1,10 +1,12 @@ | |||||||
| Summary: Tool for managing bootable, immutable filesystem trees | Summary: Tool for managing bootable, immutable filesystem trees | ||||||
| Name: ostree | Name: ostree | ||||||
| Version: 2017.13 | Version: 2017.13 | ||||||
| Release: 2%{?dist} | Release: 3%{?dist} | ||||||
| Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz | Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz | ||||||
| # https://bugzilla.redhat.com/show_bug.cgi?id=1451458 | # https://bugzilla.redhat.com/show_bug.cgi?id=1451458 | ||||||
| Source1: 91-ostree.preset | Source1: 91-ostree.preset | ||||||
|  | # Backported from upstream | ||||||
|  | Patch0: 0001-fetcher-curl-Fix-invalid-memory-access-in-finalize.patch | ||||||
| License: LGPLv2+ | License: LGPLv2+ | ||||||
| URL: https://ostree.readthedocs.io/en/latest/ | URL: https://ostree.readthedocs.io/en/latest/ | ||||||
| 
 | 
 | ||||||
| @ -160,6 +162,10 @@ install -D -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/9 | |||||||
| %{_libexecdir}/libostree/ostree-trivial-httpd | %{_libexecdir}/libostree/ostree-trivial-httpd | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Nov 07 2017 Kalev Lember <klember@redhat.com> - 2017.13-3 | ||||||
|  | - Backport a patch to fix a gnome-software crash when installing flatpaks | ||||||
|  |   (#1497642) | ||||||
|  | 
 | ||||||
| * Thu Nov 02 2017 Colin Walters <walters@verbum.org> - 2017.13-2 | * Thu Nov 02 2017 Colin Walters <walters@verbum.org> - 2017.13-2 | ||||||
| - https://github.com/ostreedev/ostree/releases/tag/v2017.13 | - https://github.com/ostreedev/ostree/releases/tag/v2017.13 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user