Files
pkgsrc-ng/graphics/MesaLib7/patches/patch-src_glsl_ralloc.c
2016-01-21 23:41:46 +01:00

24 lines
634 B
C

$NetBSD: patch-src_glsl_ralloc.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
* Fix exit time segfault of qt5 application with modular xorg
--- src/glsl/ralloc.c.orig 2011-10-15 00:43:58.000000000 +0000
+++ src/glsl/ralloc.c
@@ -272,7 +272,7 @@ ralloc_parent(const void *ptr)
static void *autofree_context = NULL;
-static void
+static void __attribute__((__destructor__))
autofree(void)
{
ralloc_free(autofree_context);
@@ -283,7 +283,6 @@ ralloc_autofree_context(void)
{
if (unlikely(autofree_context == NULL)) {
autofree_context = ralloc_context(NULL);
- atexit(autofree);
}
return autofree_context;
}