aboutsummaryrefslogtreecommitdiffstats
path: root/x11-servers
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2003-04-30 08:16:01 +0800
committeranholt <anholt@FreeBSD.org>2003-04-30 08:16:01 +0800
commit8c265bfe7ccf558d893b7d98ba3db2dcac2724b8 (patch)
tree288ab70f5b10e8bdfd13e35101c295457ed408f8 /x11-servers
parent540dda40affc7fdd8621938c0f4df6ea391b85d3 (diff)
downloadfreebsd-ports-graphics-8c265bfe7ccf558d893b7d98ba3db2dcac2724b8.tar.gz
freebsd-ports-graphics-8c265bfe7ccf558d893b7d98ba3db2dcac2724b8.tar.zst
freebsd-ports-graphics-8c265bfe7ccf558d893b7d98ba3db2dcac2724b8.zip
Fix a small memory leak in __driUtilCreateScreen()
PR: ports/51580 Submitted by: Alexey Dokuchaev <danfe@regency.nsu.ru>
Diffstat (limited to 'x11-servers')
-rw-r--r--x11-servers/XFree86-4-Server-snap/Makefile2
-rw-r--r--x11-servers/XFree86-4-Server-snap/files/patch-dri_util.c26
-rw-r--r--x11-servers/XFree86-4-Server/Makefile2
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-dri_util.c26
4 files changed, 54 insertions, 2 deletions
diff --git a/x11-servers/XFree86-4-Server-snap/Makefile b/x11-servers/XFree86-4-Server-snap/Makefile
index 119afd95417..50250b78873 100644
--- a/x11-servers/XFree86-4-Server-snap/Makefile
+++ b/x11-servers/XFree86-4-Server-snap/Makefile
@@ -7,7 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.3.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \
${MASTER_SITE_LOCAL:S/$/:local/}
diff --git a/x11-servers/XFree86-4-Server-snap/files/patch-dri_util.c b/x11-servers/XFree86-4-Server-snap/files/patch-dri_util.c
new file mode 100644
index 00000000000..0084acff7a3
--- /dev/null
+++ b/x11-servers/XFree86-4-Server-snap/files/patch-dri_util.c
@@ -0,0 +1,26 @@
+Index: lib/GL/dri/dri_util.c
+===================================================================
+RCS file: /home/ncvs/xfree/xc/lib/GL/dri/dri_util.c,v
+retrieving revision 1.6
+retrieving revision 1.7
+diff -u -u -r1.6 -r1.7
+--- lib/GL/dri/dri_util.c 15 Feb 2003 22:12:29 -0000 1.6
++++ lib/GL/dri/dri_util.c 28 Apr 2003 17:01:25 -0000 1.7
+@@ -921,7 +921,7 @@
+ int directCapable;
+ __DRIscreenPrivate *psp;
+ drmHandle hFB, hSAREA;
+- char *BusID, *driverName;
++ char *BusID, *driverName = NULL;
+ drmMagic magic;
+
+ if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)) {
+@@ -1010,6 +1010,8 @@
+ (void)XF86DRICloseConnection(dpy, scrn);
+ return NULL;
+ }
++ if (driverName)
++ Xfree(driverName);
+
+ /* install driver's callback functions */
+ memcpy(&psp->DriverAPI, driverAPI, sizeof(struct __DriverAPIRec));
diff --git a/x11-servers/XFree86-4-Server/Makefile b/x11-servers/XFree86-4-Server/Makefile
index 119afd95417..50250b78873 100644
--- a/x11-servers/XFree86-4-Server/Makefile
+++ b/x11-servers/XFree86-4-Server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.3.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \
${MASTER_SITE_LOCAL:S/$/:local/}
diff --git a/x11-servers/XFree86-4-Server/files/patch-dri_util.c b/x11-servers/XFree86-4-Server/files/patch-dri_util.c
new file mode 100644
index 00000000000..0084acff7a3
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-dri_util.c
@@ -0,0 +1,26 @@
+Index: lib/GL/dri/dri_util.c
+===================================================================
+RCS file: /home/ncvs/xfree/xc/lib/GL/dri/dri_util.c,v
+retrieving revision 1.6
+retrieving revision 1.7
+diff -u -u -r1.6 -r1.7
+--- lib/GL/dri/dri_util.c 15 Feb 2003 22:12:29 -0000 1.6
++++ lib/GL/dri/dri_util.c 28 Apr 2003 17:01:25 -0000 1.7
+@@ -921,7 +921,7 @@
+ int directCapable;
+ __DRIscreenPrivate *psp;
+ drmHandle hFB, hSAREA;
+- char *BusID, *driverName;
++ char *BusID, *driverName = NULL;
+ drmMagic magic;
+
+ if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)) {
+@@ -1010,6 +1010,8 @@
+ (void)XF86DRICloseConnection(dpy, scrn);
+ return NULL;
+ }
++ if (driverName)
++ Xfree(driverName);
+
+ /* install driver's callback functions */
+ memcpy(&psp->DriverAPI, driverAPI, sizeof(struct __DriverAPIRec));