[mutter/gnome-3-30] cogl-auto-texture: Avoid a double-free crash
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-30] cogl-auto-texture: Avoid a double-free crash
- Date: Wed, 23 Jan 2019 23:54:40 +0000 (UTC)
commit 1cb21877edd9c7c5bc991527ae70879b1e9fece0
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Thu Oct 11 06:49:22 2018 +0000
cogl-auto-texture: Avoid a double-free crash
If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `cogl_texture_new_with_size` was trying to use the same CoglError
twice. The second time was after it had already been freed.
Bug reported and fix provided by Gert van de Kraats.
https://launchpad.net/bugs/1790525
(cherry picked from commit d21478b0f0163b0688abe065a7009b33453d0d00)
cogl/cogl/deprecated/cogl-auto-texture.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/cogl/cogl/deprecated/cogl-auto-texture.c b/cogl/cogl/deprecated/cogl-auto-texture.c
index 29a5f73ef..fe52e1575 100644
--- a/cogl/cogl/deprecated/cogl-auto-texture.c
+++ b/cogl/cogl/deprecated/cogl-auto-texture.c
@@ -94,6 +94,7 @@ cogl_texture_new_with_size (unsigned int width,
if (!cogl_texture_allocate (tex, &skip_error))
{
cogl_error_free (skip_error);
+ skip_error = NULL;
cogl_object_unref (tex);
tex = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]