diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-06 10:52:40 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-06 10:52:40 -0700 |
commit | 2746c681639f9512e6e45fb8d0151b996b6aff7f (patch) | |
tree | af27a4e1a498007bb8da3dcb5c0356720cb66348 /hw | |
parent | 1e6cf8ec20d07b73a11116564aba71b4e4291dcd (diff) | |
parent | 9878e097a7de2f86eff0dcfd9fe5d83b162197ec (diff) |
Merge remote-tracking branch 'alanc/master'
Diffstat (limited to 'hw')
-rw-r--r-- | hw/dmx/config/dmxcompat.c | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86sbusBus.c | 6 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/Sbus.c | 8 |
4 files changed, 16 insertions, 4 deletions
diff --git a/hw/dmx/config/dmxcompat.c b/hw/dmx/config/dmxcompat.c index bd9f12738..107991a96 100644 --- a/hw/dmx/config/dmxcompat.c +++ b/hw/dmx/config/dmxcompat.c @@ -228,5 +228,9 @@ dmxVDLRead(const char *filename) break; } } + + if (str != stdin) + fclose(str); + return entry; } diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index ea1842069..7a949fd74 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -561,8 +561,10 @@ xf86VTSwitch(void) for (ih = InputHandlers; ih; ih = ih->next) xf86EnableInputHandler(ih); +#ifdef XSERVER_PLATFORM_BUS /* check for any new output devices */ xf86platformVTProbe(); +#endif OsReleaseSIGIO(); } diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index b6a6b94b3..07eb71ed8 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -641,14 +641,16 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, int i, index; sbusCmapPtr cmap; struct fbcmap fbcmap; - unsigned char *data = malloc(numColors * 3); + unsigned char *data; cmap = SBUSCMAPPTR(pScrn->pScreen); if (!cmap) return; fbcmap.count = 0; fbcmap.index = indices[0]; - fbcmap.red = data; + fbcmap.red = data = malloc(numColors * 3); + if (!data) + return; fbcmap.green = data + numColors; fbcmap.blue = fbcmap.green + numColors; for (i = 0; i < numColors; i++) { diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c index 826000712..14e6d4bfd 100644 --- a/hw/xfree86/os-support/bus/Sbus.c +++ b/hw/xfree86/os-support/bus/Sbus.c @@ -617,8 +617,10 @@ sparcPromPathname2Node(const char *pathName) return 0; strcpy(name, pathName); name[i + 1] = 0; - if (name[0] != '/') + if (name[0] != '/') { + free(name); return 0; + } p = strchr(name + 1, '/'); if (p) *p = 0; @@ -629,8 +631,10 @@ sparcPromPathname2Node(const char *pathName) *regstr++ = 0; else regstr = p; - if (name + 1 == regstr) + if (name + 1 == regstr) { + free(name); return 0; + } promGetSibling(0); i = promWalkPathname2Node(name + 1, regstr, promRootNode, 0); free(name); |