xserver: Branch 'server-1.7-nominations' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Mon Oct 19 13:22:06 PDT 2009
hw/xquartz/X11Controller.m | 4 +---
hw/xquartz/mach-startup/bundle-main.c | 6 +-----
2 files changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 75e52c777c095abbd13a096dbda885019a0bc5ce
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Oct 2 19:20:24 2009 -0700
XQuartz: Fix a possible minor memory leak
(cherry picked from commit 24e640e1fa6cfb3917ba90dcdabf1fadddff20aa)
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 691b555..640a91f 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -300,6 +300,7 @@ kern_return_t do_request_fd_handoff_socket(mach_port_t port, string_t filename)
handoff_data->fd = create_socket(handoff_data->filename);
if(!handoff_data->fd) {
+ free(handoff_data);
return KERN_FAILURE;
}
commit 31c6fc76733490117c75697d28b7dfb25cc4537c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Sep 28 23:01:59 2009 -0700
XQuartz: Remove the redundant xquartz_resetenv_display
unsetenv(DISPLAY) takes care of this for us anyway
(cherry picked from commit d2263645d839c9edeedea0835d26f1f41b37f70e)
(cherry picked from commit f3223c71cfc638e695981e527517d48ea00d124d)
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index d8d23ec..1191547 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -52,8 +52,6 @@
#include <sys/types.h>
#include <sys/wait.h>
-BOOL xquartz_resetenv_display = NO;
-
@implementation X11Controller
- (void) awakeFromNib
@@ -353,7 +351,7 @@ BOOL xquartz_resetenv_display = NO;
newargv[3] = NULL;
s = getenv("DISPLAY");
- if (xquartz_resetenv_display || s == NULL || s[0] == 0) {
+ if (s == NULL || s[0] == 0) {
snprintf(buf, sizeof(buf), ":%s", display);
setenv("DISPLAY", buf, TRUE);
}
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 146ea11..691b555 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -62,8 +62,6 @@ void DarwinListenOnOpenFD(int fd);
extern int noPanoramiXExtension;
-extern int xquartz_resetenv_display;
-
#define DEFAULT_CLIENT X11BINDIR "/xterm"
#define DEFAULT_STARTX X11BINDIR "/startx"
#define DEFAULT_SHELL "/bin/sh"
@@ -429,9 +427,6 @@ static int startup_trigger(int argc, char **argv, char **envp) {
if((s = getenv("DISPLAY"))) {
fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s);
unsetenv("DISPLAY");
-
- /* This tells X11Controller to not use the environment's DISPLAY and reset it based on the server's display */
- xquartz_resetenv_display = 1;
} else {
fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set). Starting X server.\n");
}
More information about the xorg-commit
mailing list