meego-w40:xserver-xorg.git
6 years agoChangelog: 2:1.9.5-meego1471 meego/2_1.9.5-meego1471
Avinash [Mon, 21 Nov 2011 14:07:24 +0000 (16:07 +0200)]
Changelog: 2:1.9.5-meego1471
Signed-off-by: Avinash <avinash.alok@symbio.com>
6 years agoos/connection: Prevent WaitForSomething from busylooping
Erkki Seppälä [Tue, 4 Oct 2011 13:11:52 +0000 (16:11 +0300)]
os/connection: Prevent WaitForSomething from busylooping

CheckConnections didn't check for write blocked clients. If an
ignored client is write-blocked but then closed, the Select in
WaitForSomething will return EBADF. CheckConnections is supposed to
weed these connections out but it doesn't, because it checks only for
AllClients, and ignored clients (which can still be written to) aren't
in that set.

This patch makes CheckConnections check also the set
ClientsWriteBlocked in addition to AllClients.

Test case: run cnee, put it in suspend with ^Z and generate a lot of
events, so that its connection becomes write blocked. Now kill -9 the
process and witness X entering a neverending loop. Cnee's connection
issues RecordEnableContext, which makes the connection ignored.

Reported-by: Rami Ylimaki <rami.ylimaki@vincit.fi>
Tested-by: Remes Lars <lars.remes@symbio.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
6 years agoChangelog: 2:1.9.5-meego1411 meego/2_1.9.5-meego1411
aalok [Tue, 18 Oct 2011 17:00:08 +0000 (20:00 +0300)]
Changelog: 2:1.9.5-meego1411

Signed-off-by: Avinash <avinash.alok@symbio.com>
6 years agoDEBUG: Save various event histories to find causes of rare crashes.
Rami Ylimäki [Thu, 30 Jun 2011 11:50:25 +0000 (14:50 +0300)]
DEBUG: Save various event histories to find causes of rare crashes.

Fixes: NB#275947 - X server doesn't preserve enough context
for crash reports

Reported-by: Ylimaki Rami <rami.ylimaki@vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Tested-by: Malik Attiq <ext-attiq.1.malik@nokia.com>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoChangelog: 2:1.9.5-meego1353 meego/2_1.9.5-meego1353
aalok [Thu, 13 Oct 2011 16:12:37 +0000 (19:12 +0300)]
Changelog: 2:1.9.5-meego1353
Fixes bug - immutable XRandR properties can be deleted.

Fixes: NB#276479

Reported-by: Verhaegen Luc <libv@skynet.be>
Reviewed-by: Ylimaki Rami <rami.ylimaki@vincit.fi>
Tested-by: Remes Lars <lars.remes@symbio.com>
Signed-off-by: Avinash <avinash.alok@symbio.com>
6 years agodebian/changelog: Disallow reconfiguring immutable output properties.
aalok [Thu, 13 Oct 2011 16:08:07 +0000 (19:08 +0300)]
debian/changelog: Disallow reconfiguring immutable output properties.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agorandr: stop clients from deleting immutable output properties
Luc Verhaegen [Tue, 23 Aug 2011 22:19:59 +0000 (00:19 +0200)]
randr: stop clients from deleting immutable output properties

Immutable in randr means that clients are not able to alter the
property itself, they are only allowed to alter the property value.
This logically means that the property then should not be deleted
by the client either.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoChangelog: 2:1.9.5-meego1352 meego/2_1.9.5-meego1352
aalok [Mon, 10 Oct 2011 09:51:56 +0000 (12:51 +0300)]
Changelog: 2:1.9.5-meego1352
Fixes: NB#283097 - Don't reduce X server core dumps

debian/changelog: X server core dumps are reduced currently.

Signed-off-by: Avinash <ext-avinash.alok@nokia.com>
Reported-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodebian: Disable reduction of X server core dumps.
Rami Ylimäki [Mon, 19 Sep 2011 14:04:57 +0000 (17:04 +0300)]
debian: Disable reduction of X server core dumps.

The presence of /etc/rich-core/disable-reducer/Xorg prevents
rich-core-dumper from reducing the X server core dumps.

Fixes: NB#283097 - X server core dumps are reduced

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
6 years agoChangelog: 2:1.9.5-meego1351 meego/2_1.9.5-meego1351
Rami Ylimäki [Fri, 2 Sep 2011 10:53:41 +0000 (13:53 +0300)]
Changelog: 2:1.9.5-meego1351
Fixes: NB#279439 - Xorg server crashes when running spandex

debian/changelog: DRI2Drawable stale pointer fix

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reported-by: Remes Lars <lars.remes@symbio.com>
Tested-by: Malik Attiq <ext-attiq.1.malik@nokia.com>
Reviewed-by: Remes Lars <lars.remes@symbio.com>
6 years agodri2: Clear references to destroyed X drawables in DRI2 drawables.
Rami Ylimäki [Wed, 31 Aug 2011 11:49:17 +0000 (14:49 +0300)]
dri2: Clear references to destroyed X drawables in DRI2 drawables.

When the first DRI2 drawable associated with a window is created, it's
added to the resource tables with two resource IDs. The first ID is
unique and is given to the client that creates the DRI2 drawable. The
second ID is equivalent to the window ID.

When DRI2 drawables associated with a window are destroyed, or vice
versa, the association between these two resources must be broken
reliably. These two cases are described below in more detail.

Case 1. When the window gets destroyed, all resources with the window
ID are released. So the DRI2 drawable resource with the window ID is
also released, but only its drawable member (pointer to the window) is
cleared to indicate that the associated window doesn't exist
anymore. The DRI2 drawable resource remains still in resource tables
as long as the unique resource IDs exist. Furthermore, the DRI2
drawable is not released from memory until it's not referenced anymore
within the X server or graphics driver. This case works currently fine
and doesn't need to be fixed.

Case 2. If all of the DRI2 drawables with unique IDs are destroyed
during the lifetime of the window, the DRI2 drawable with the window
ID is also automatically released as there is no more need to care
about destruction of windows that don't have DRI2 drawables associated
with them. However, there still might be references to the destroyed
DRI2 drawable resources lying around when they are removed from the
resource tables. For example, these DRI2 drawables might be living for
a short time in the swap request queue of the graphics driver. If the
associated window is destroyed before the swap request queue has been
flushed, the DRI2 drawables of the queue will point to a destroyed
window for a short while.

This patch fixes the case 2 described above. Whenever a window is
destroyed, we make sure that the associated DRI2 drawables, that are
still alive, will get their drawable member cleared. Otherwise
DRI2DrawableGone will access this stale pointer when the DRI2 drawable
is finally removed from the swap request queue.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Lars Remes <lars.remes@symbio.com>
6 years agodri2: Initialize needInvalidate member for DRI2Drawables.
Rami Ylimäki [Wed, 31 Aug 2011 14:17:52 +0000 (17:17 +0300)]
dri2: Initialize needInvalidate member for DRI2Drawables.

If the client is not behaving correctly and swaps buffers before
getting them, Valgrind will complain about unitialized memory being
used in DRI2InvalidateDrawable.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoNOKIA: Crash behaviour fixes. meego/2_1.9.5-meego1211
Rami Ylimäki [Fri, 27 May 2011 08:06:39 +0000 (11:06 +0300)]
NOKIA: Crash behaviour fixes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoNOKIA: Abort immediately if fatal signal occurs.
Rami Ylimäki [Tue, 24 May 2011 09:50:01 +0000 (12:50 +0300)]
NOKIA: Abort immediately if fatal signal occurs.

Try to preserve as much program state as possible if X server
crashes. By default X server cleans up before aborting, which may
destroy important program state information from coredumps. Therefore
X server is aborted immediately and no cleanup is done.

Kernel truncates coredumps if it's interrupted by a signal while core
is being dumped to a pipe. At least SIGALRM and SIGIO have been
noticed to occur during dumping and causing the coredump to be
truncated. X server must therefore trap the fatal signals so that it
can block signals before aborting.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodebian/changelog: DRI2 invalidation fixes. meego/2_1.9.5-meego1191
Rami Ylimäki [Mon, 9 May 2011 13:28:35 +0000 (16:28 +0300)]
debian/changelog: DRI2 invalidation fixes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodri2: Don't send so many needless invalidate events
Ville Syrjälä [Fri, 6 May 2011 12:46:47 +0000 (15:46 +0300)]
dri2: Don't send so many needless invalidate events

Only send invalidate events for drawables if some client has requested
some buffers.

Fixes: NB#253501 - Don't send needless DRI2 invalida events

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodebian/changelog: DRI2 invalidation fixes. meego/2_1.9.5-meego1181
Rami Ylimäki [Tue, 3 May 2011 09:14:37 +0000 (12:14 +0300)]
debian/changelog: DRI2 invalidation fixes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodri2: Invalidate window pixmaps
Ville Syrjälä [Tue, 26 Apr 2011 19:54:42 +0000 (22:54 +0300)]
dri2: Invalidate window pixmaps

While a redirected window is flipped, its pixmap may still be used as
and EGL image and should also get invalidated. When sending invalidate
events for a window, also send the events for its pixmap.

Fixes: NB#251344 - Send invalidate events for all affected drawables

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap
Keith Packard [Mon, 7 Feb 2011 18:52:57 +0000 (20:52 +0200)]
dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap

Without this, when a compositing manager unredirects a fullscreen window which
uses DRI2 and page flipping, the DRI2 buffer information for the compositing
manager's output window (typically the Composite Overlay Window or root window)
may become stale, resulting in all kinds of hilarity.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35452 .

[Original patch by Michel Dänzer <michel@daenzer.net>]
[Tree walk optimized version by Keith Packard <keithp@keithp.com>]

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodri2: Make DRI2InvalidateDrawable() accept NULL drawable
Ville Syrjälä [Tue, 26 Apr 2011 19:53:40 +0000 (22:53 +0300)]
dri2: Make DRI2InvalidateDrawable() accept NULL drawable

Makes following patches simpler.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodebian/changelog: Composite fixes. meego/2_1.9.5-meego1161
Rami Ylimäki [Wed, 20 Apr 2011 07:10:31 +0000 (10:10 +0300)]
debian/changelog: Composite fixes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agocomposite: Recompute clipping when changing between manual and automatic redirection
Ville Syrjälä [Wed, 13 Apr 2011 18:46:20 +0000 (21:46 +0300)]
composite: Recompute clipping when changing between manual and automatic redirection

Call compMarkWindows() when changing between manual and automatic
redirection modes. Otherwise the window clipping won't be recomputed
correctly.

Fixes: NB#246208 - Recompute clipping when changing between manual and automatic redirection

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agocomposite: Fix pWin->redirectDraw when changing between manual and automatic redirection
Ville Syrjälä [Wed, 13 Apr 2011 18:45:43 +0000 (21:45 +0300)]
composite: Fix pWin->redirectDraw when changing between manual and automatic redirection

compAllowPixmap() is not called when changing between manual and
automatic redirection modes. That means pWin->redirectDraw is left
with an incorrect value, and miComputeClips() gets confused whether
the window is supposed to be treated as transparent or not. Fix
the issue by updating pWin->redirectDraw in compCheckRedirect()
even when not calling compAllocPixmap().

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agocomposite: Remove useles pWin->mapped tests
Ville Syrjälä [Thu, 14 Apr 2011 17:44:07 +0000 (20:44 +0300)]
composite: Remove useles pWin->mapped tests

compMarkWindows() already checks pWin->viewable, so checking
pWin->mapped beforehand is superfluous. Also avoid doing
compMarkWindows() twice in compRedirectWindow() by checking
if windows were already marked.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agocomposite: Remove stale comment
Ville Syrjälä [Thu, 14 Apr 2011 17:38:50 +0000 (20:38 +0300)]
composite: Remove stale comment

Remove a comment which became outdated when the unmap+map cycle
was eliminated from window redirection changes.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodebian/changelog: Damage optimizations and DRI2 stability fixes. meego/2_1.9.5-meego1142
Rami Ylimäki [Wed, 13 Apr 2011 11:57:30 +0000 (14:57 +0300)]
debian/changelog: Damage optimizations and DRI2 stability fixes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodri2: Pass out_count by value to update_dri2_drawable_buffers()
Ville Syrjälä [Tue, 12 Apr 2011 14:57:00 +0000 (17:57 +0300)]
dri2: Pass out_count by value to update_dri2_drawable_buffers()

update_dri2_drawable_buffers() doesn't modify out_count, so pass it
by value.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodri2: Handle calloc() failure
Ville Syrjälä [Tue, 12 Apr 2011 14:56:59 +0000 (17:56 +0300)]
dri2: Handle calloc() failure

Don't access invalid memory if calloc() fails to allocate the buffers
array.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agoReplace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers...
Justin Dou [Tue, 12 Apr 2011 14:56:58 +0000 (17:56 +0300)]
Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function

The calling for allocate_or_reuse_buffer may fail due to some reason, e.g. out of memory.
If the buffers[] were not initialized to be NULL, the following err_out may try to access an illegal memory, which will cause X crash afterward.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Justin Dou <Justin.Dou@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agodamage: use DamageReportDamage for the initial borderClip damage report
Erkki Seppälä [Thu, 24 Mar 2011 11:34:17 +0000 (13:34 +0200)]
damage: use DamageReportDamage for the initial borderClip damage report

Instead of using DamageDamageRegion for reporting the first (virtual)
damage in ProcDamageCreate that covers the borderClip of the drawable
window, use a function DamageReportDamage directly (previously called
damageReportDamage). This avoids sending all other damage listeners a
full window update when a new damage object is created.

As this patch makes DamageReportDamage a public interface, the
function has been moved into the part of the file that contains all
the other public functions. The function has not been otherwise
modified.

Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Keith Packard <keithp@keithp.com>
6 years agodebian/changelog: Upstream sync + stability fixes & optimizations. meego/2_1.9.5-meego1141
Rami Ylimäki [Fri, 8 Apr 2011 09:10:53 +0000 (12:10 +0300)]
debian/changelog: Upstream sync + stability fixes & optimizations.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxfree86: loader: use one exit code only for readability
Tiago Vignatti [Thu, 31 Mar 2011 14:46:42 +0000 (17:46 +0300)]
xfree86: loader: use one exit code only for readability

No functional changes. Spaghetti code for the win! \o/

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agoxfree86: xv: fix double free in xf86XVFreeAdaptor
Tiago Vignatti [Thu, 31 Mar 2011 20:44:03 +0000 (23:44 +0300)]
xfree86: xv: fix double free in xf86XVFreeAdaptor

When xf86XVFreeAdaptor is called more than once in xf86XVInitAdaptors (it may,
but not often), the conditional being changed in this patch will always take
true path and will keep freeing pAdaptor->pAttributes, thus letting the system
error-prone.

This patch fix such problem checking for a pointer instead the number of
attributes. Such pointer will be deallocated when xf86XVFreeAdaptor is called
first and will not let the code re-run in the following calls. This is a bit
similar how the surroundings code is already doing.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agoxfree86: xv: set pointers to NULL in xf86XVFreeAdaptor
Tiago Vignatti [Mon, 4 Apr 2011 17:25:32 +0000 (20:25 +0300)]
xfree86: xv: set pointers to NULL in xf86XVFreeAdaptor

As a good practice and for eventual double frees.

The reason of this patch is due the resilience of xf86XVInitAdaptors, where
for any adaptor failure it's able to keep trying registering the following
ones.

I discussed briefly with Pauli and Ville about a bigger refactoring of such
function, doing it in a way to return instantly when a failure happens; after
all that's how mostly of the other driver functions work. Instead, we just
thought that xf86XVInitAdaptors is wise and cool, and eventually other driver
functions should be even following the main idea of resilience.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agoos: fix use after free in EstablishNewConnections
Tiago Vignatti [Mon, 4 Apr 2011 18:40:06 +0000 (21:40 +0300)]
os: fix use after free in EstablishNewConnections

In the case of failure on AllocNewConnection, new_trans_conn cannot be
dereferenced because it's already freed. Swapping the order of this logic fix
the changes introduced in 04956b80431169e0ae713a3e6ba4cdc157ce3a66.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
CC: Jeremy Huddleston <jeremyhu@freedesktop.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agodix: don't free stranger pointers inside AllocARGBCursor
Tiago Vignatti [Mon, 4 Apr 2011 19:31:42 +0000 (22:31 +0300)]
dix: don't free stranger pointers inside AllocARGBCursor

This seems a good convention to follow: if pointers are allocate outside a
given function, then free there as well when a failure occurs.

AllocARGBCursor and its callers were mixing up the freeing of resources and
causing a particular double free inside TileScreenSaver (srcbits and mskbits).

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
6 years agoMerge commit 'fdo/server-1.9-branch' into sa
Rami Ylimäki [Fri, 8 Apr 2011 08:13:08 +0000 (11:13 +0300)]
Merge commit 'fdo/server-1.9-branch' into sa

6 years agoNOKIA: debian: Remove obsolete matching rule for touchpads.
Rami Ylimäki [Thu, 17 Mar 2011 10:27:18 +0000 (12:27 +0200)]
NOKIA: debian: Remove obsolete matching rule for touchpads.

A two touchpoint touch screen was only used in early prototypes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoNOKIA: debian: Optimize startup time by skipping xkbcomp invocations.
Rami Ylimäki [Thu, 17 Mar 2011 10:25:07 +0000 (12:25 +0200)]
NOKIA: debian: Optimize startup time by skipping xkbcomp invocations.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxkb: Prevent leaking of XKB geometry information on copy.
Rami Ylimäki [Wed, 30 Mar 2011 09:59:40 +0000 (12:59 +0300)]
xkb: Prevent leaking of XKB geometry information on copy.

Currently shapes, sections and doodads may leak on copy.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxkb: Introduce helper function to handle similar reallocations.
Rami Ylimäki [Wed, 30 Mar 2011 13:25:45 +0000 (16:25 +0300)]
xkb: Introduce helper function to handle similar reallocations.

This is preparation for a memory leak fix and doesn't contain any
functional changes.

Note that two variables are generally used for reallocation and
clearing of arrays: geom->sz_elems (reallocation) and geom->num_elems
(clearing). The interface of XkbGeomRealloc is deliberately kept
simple and it only accepts geom->sz_elems as argument, because that is
needed to determine whether the array needs to be resized. When the
array is cleared, we just assume that either geom->sz_elems and
geom->num_elems are synchronized to be equal or that unused elements
are cleared whenever geom->num_elems is set to be less than
geom->sz_elems without reallocation.

Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoRevert "xkb: Introduce helper function to handle similar reallocations."
Rami Ylimäki [Thu, 31 Mar 2011 09:59:28 +0000 (12:59 +0300)]
Revert "xkb: Introduce helper function to handle similar reallocations."

This reverts commit 3aa09d9f258e338101b1a3053c9259ac4b7358d5.

6 years agoRevert "xkb: Prevent leaking of XKB geometry information on copy."
Rami Ylimäki [Thu, 31 Mar 2011 09:59:00 +0000 (12:59 +0300)]
Revert "xkb: Prevent leaking of XKB geometry information on copy."

This reverts commit ccdeec739db9094cfb4d11ac2b0755f5d3c23ce3.

6 years agoxfree86: loader: fix memory leaks in LoaderListDirs
Tiago Vignatti [Mon, 28 Mar 2011 17:24:52 +0000 (20:24 +0300)]
xfree86: loader: fix memory leaks in LoaderListDirs

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agoos: use DebugF for debugging
Tiago Vignatti [Mon, 4 Apr 2011 14:21:01 +0000 (17:21 +0300)]
os: use DebugF for debugging

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agoxfree86: fix bad free configInputDevices
Tiago Vignatti [Mon, 4 Apr 2011 14:14:42 +0000 (17:14 +0300)]
xfree86: fix bad free configInputDevices

introduced in 93ca526892c0d22afa05cce6496198c652043a19.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agorender: fix memory leaks in ProcRenderCompositeGlyphs
Tiago Vignatti [Tue, 29 Mar 2011 15:22:50 +0000 (18:22 +0300)]
render: fix memory leaks in ProcRenderCompositeGlyphs

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Soren Sandmann <ssp@redhat.com>
6 years agoxkb: fix fd leak in XkbDDXListComponent
Tiago Vignatti [Tue, 29 Mar 2011 14:17:40 +0000 (17:17 +0300)]
xkb: fix fd leak in XkbDDXListComponent

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agodix: fix memory leak in ProcListExtensions
Tiago Vignatti [Tue, 29 Mar 2011 13:54:14 +0000 (16:54 +0300)]
dix: fix memory leak in ProcListExtensions

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agomi: fix memory leak in miZeroLine
Tiago Vignatti [Tue, 29 Mar 2011 13:48:21 +0000 (16:48 +0300)]
mi: fix memory leak in miZeroLine

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agoxi: fix memory leak in AddExtensionClient
Tiago Vignatti [Mon, 28 Mar 2011 17:13:11 +0000 (20:13 +0300)]
xi: fix memory leak in AddExtensionClient

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agodix: fix memory leak in AllocShared
Tiago Vignatti [Mon, 28 Mar 2011 17:09:04 +0000 (20:09 +0300)]
dix: fix memory leak in AllocShared

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agodix: fix memory leak in AllocPseudo
Tiago Vignatti [Mon, 28 Mar 2011 17:07:06 +0000 (20:07 +0300)]
dix: fix memory leak in AllocPseudo

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agoos: fix memory and fd leaks in Popen
Tiago Vignatti [Mon, 28 Mar 2011 16:21:28 +0000 (19:21 +0300)]
os: fix memory and fd leaks in Popen

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
6 years agoxfree86: fix memory leak in xf86LoadModules
Tiago Vignatti [Tue, 29 Mar 2011 17:04:24 +0000 (20:04 +0300)]
xfree86: fix memory leak in xf86LoadModules

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoxfree86: fix memory leaks in configLayout
Tiago Vignatti [Tue, 29 Mar 2011 16:49:32 +0000 (19:49 +0300)]
xfree86: fix memory leaks in configLayout

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoxfree86: fix memory leak in xf86ConfigFbEntity
Tiago Vignatti [Fri, 25 Mar 2011 20:21:21 +0000 (22:21 +0200)]
xfree86: fix memory leak in xf86ConfigFbEntity

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agofb: fix memory leak in fbOverlayFinishScreenInit
Tiago Vignatti [Fri, 25 Mar 2011 20:10:55 +0000 (22:10 +0200)]
fb: fix memory leak in fbOverlayFinishScreenInit

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoXi: fix memory leak in ProcXGetSelectedExtensionEvents
Tiago Vignatti [Fri, 25 Mar 2011 20:07:44 +0000 (22:07 +0200)]
Xi: fix memory leak in ProcXGetSelectedExtensionEvents

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodix: fix memory leak in SetDefaultFontPath
Tiago Vignatti [Fri, 25 Mar 2011 20:07:31 +0000 (22:07 +0200)]
dix: fix memory leak in SetDefaultFontPath

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agomi: fix memory leak in miFillUniqueSpanGroup
Tiago Vignatti [Fri, 25 Mar 2011 19:33:15 +0000 (21:33 +0200)]
mi: fix memory leak in miFillUniqueSpanGroup

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoxi: fix memory leak in ProcXIQueryDevice
Tiago Vignatti [Fri, 25 Mar 2011 17:27:17 +0000 (19:27 +0200)]
xi: fix memory leak in ProcXIQueryDevice

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agomi: fix memory leak in miInitVisuals
Tiago Vignatti [Fri, 25 Mar 2011 17:21:03 +0000 (19:21 +0200)]
mi: fix memory leak in miInitVisuals

Free the pointers inside miInitVisuals, so the callers of this function
(fboverlay.c and fbscreen.c) don't need to worry with deallocation in the case
of failure.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoxfree86: dri2: fix memory leak and free resources properly
Tiago Vignatti [Fri, 25 Mar 2011 16:56:02 +0000 (18:56 +0200)]
xfree86: dri2: fix memory leak and free resources properly

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoxorg: remove unused pointer values all over the server
Tiago Vignatti [Fri, 25 Mar 2011 16:24:34 +0000 (18:24 +0200)]
xorg: remove unused pointer values all over the server

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodix: remove unused macro
Tiago Vignatti [Wed, 23 Mar 2011 16:08:29 +0000 (18:08 +0200)]
dix: remove unused macro

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodix: remove unused debug code
Tiago Vignatti [Wed, 23 Mar 2011 16:06:51 +0000 (18:06 +0200)]
dix: remove unused debug code

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoMerge commit 'tiago/for-jeremy-1.9' into master-next
Rami Ylimäki [Mon, 4 Apr 2011 12:29:58 +0000 (15:29 +0300)]
Merge commit 'tiago/for-jeremy-1.9' into master-next

6 years agoos/client: Prevent rare fd leak in DetermineClientPid
Erkki Seppälä [Thu, 24 Mar 2011 13:41:16 +0000 (15:41 +0200)]
os/client: Prevent rare fd leak in DetermineClientPid

DetermineClientPid didn't close file descriptor if read on
/proc/pid/cmdline failed. Adjusted the code to disregard the close
return value and perform the return after that, if the read failed or
returned EOF.

Signed-off-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoconfig: handle device change event properly
Erkki Seppälä [Fri, 18 Mar 2011 14:27:50 +0000 (16:27 +0200)]
config: handle device change event properly

wakeup_handler in udev.c wasn't dealing with udev change events.
There are situations when a device can gain its input capabilities
after it has been added to the system and therefore the change events
must be handled as well.

The change is handled as a consecutive device removal and addition.

Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Stefan Kost <Stefan.Kost@nokia.com>
6 years agodebian/changelog: Expose currently served client to driver. meego/2_1.9.5-meego1122
Rami Ylimäki [Thu, 24 Mar 2011 12:44:36 +0000 (14:44 +0200)]
debian/changelog: Expose currently served client to driver.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoNOKIA: dix: Expose client pointer for currently in processing client
Pauli Nieminen [Mon, 7 Mar 2011 18:40:33 +0000 (20:40 +0200)]
NOKIA: dix: Expose client pointer for currently in processing client

A hack to allow xv driver code to ignore a client.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
6 years agodebian/changelog: Initialization of replies + upstream sync. meego/2_1.9.5-meego1121
Rami Ylimäki [Wed, 23 Mar 2011 10:39:08 +0000 (12:39 +0200)]
debian/changelog: Initialization of replies + upstream sync.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoMerge commit 'fdo/server-1.9-branch' into master-next
Rami Ylimäki [Wed, 23 Mar 2011 10:23:35 +0000 (12:23 +0200)]
Merge commit 'fdo/server-1.9-branch' into master-next

6 years agorandr: avoid uninitialized memory in rrGetScreenResources()
Oliver McFadden [Wed, 23 Mar 2011 10:18:01 +0000 (12:18 +0200)]
randr: avoid uninitialized memory in rrGetScreenResources()

Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
6 years agoX.Org: initialize all of the Reply structures on the stack.
Oliver McFadden [Mon, 21 Mar 2011 17:47:15 +0000 (19:47 +0200)]
X.Org: initialize all of the Reply structures on the stack.

The following sed expression was used to perform the initialization.

sed -i 's/^\([[:space:]]*\)\(x[[:alnum:]]\+Reply\)\([[:space:]]*\)\([[:alnum:]_]\+\)\([[:space:]]*\);/\1\2\3\4 = {0}\5;/' `find . -type f -name '*.c'`

Note that some of the memset() calls on Reply structures will now be
redundant and could be removed. I have left this for a future patch.

Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoconfigure.ac: Bump version to 1.9.5 xorg-server-1.9.5
Jeremy Huddleston [Thu, 17 Mar 2011 20:54:05 +0000 (13:54 -0700)]
configure.ac: Bump version to 1.9.5

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agodebian/changelog: Fixes to coreweb reported crashes. meego/2_1.9.4.901-meego1115
Rami Ylimäki [Wed, 16 Mar 2011 10:41:01 +0000 (12:41 +0200)]
debian/changelog: Fixes to coreweb reported crashes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodri2: Don't crash if CreateBuffer fails
Ville Syrjälä [Fri, 11 Mar 2011 19:05:59 +0000 (21:05 +0200)]
dri2: Don't crash if CreateBuffer fails

Check whether CreateBuffer() returned NULL before trying to up
the refcnt on the buffer.

Fixes: NB#236045 - Don't crash if DRI2 CreateBuffer fails

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
6 years agodebian/changelog: Fixes for memory leaks on layout changes.
Rami Ylimäki [Wed, 16 Mar 2011 10:33:24 +0000 (12:33 +0200)]
debian/changelog: Fixes for memory leaks on layout changes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxkb: Prevent leaking of XKB geometry information on copy.
Rami Ylimäki [Tue, 15 Mar 2011 13:12:15 +0000 (15:12 +0200)]
xkb: Prevent leaking of XKB geometry information on copy.

Currently shapes, sections and doodads may leak on copy.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxkb: Introduce helper function to handle similar reallocations.
Rami Ylimäki [Tue, 15 Mar 2011 14:53:38 +0000 (16:53 +0200)]
xkb: Introduce helper function to handle similar reallocations.

This is preparation for a memory leak fix and doesn't contain any
functional changes.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxkb: Release XKB component names when compiling keymap.
Rami Ylimäki [Thu, 10 Mar 2011 11:40:26 +0000 (13:40 +0200)]
xkb: Release XKB component names when compiling keymap.

Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoxkb: if the keymap failed to compile, load the default keymap instead.
Peter Hutterer [Thu, 10 Feb 2011 05:12:14 +0000 (15:12 +1000)]
xkb: if the keymap failed to compile, load the default keymap instead.

We really need symbols, compat, keynames, vmods and types for a sensible keymap.

Try this in your xorg.conf.d snippets for all keyboards:
        Option "XkbLayout" "us"
        Option "XkbVariant" "nodeadkeys"

us(nodeadkeys) doesn't exist so xkbcomp provides everything but the symbols
map. We say we want everything but don't _need_ anything, the server happily
gives us a keymap with every key mapped to NoSymbol. This in turn isn't what
we want after all.

So instead, require symbols, compat, keynames, vmods and types from the
keymap and if that fails, load the default keymap instead. If that fails
too, all bets are off.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
6 years agoxkb: split out keymap compilation.
Peter Hutterer [Thu, 10 Feb 2011 05:11:34 +0000 (15:11 +1000)]
xkb: split out keymap compilation.

Refactoring for simpler double-use in the next patch. No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
6 years agodebian/changelog: Initialize data in replies.
Rami Ylimäki [Wed, 16 Mar 2011 10:20:03 +0000 (12:20 +0200)]
debian/changelog: Initialize data in replies.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agorandr: avoid rrGetScreenResources replying with uninitialized bytes.
Oliver McFadden [Wed, 9 Mar 2011 13:09:42 +0000 (15:09 +0200)]
randr: avoid rrGetScreenResources replying with uninitialized bytes.

==9999== Syscall param writev(vector[...]) points to uninitialised byte(s)
==9999==    at 0x4AB7054: writev (writev.c:51)
==9999==    by 0x5E237: _XSERVTransWritev (Xtrans.c:912)
==9999==    by 0x6154B: FlushClient (io.c:937)
==9999==    by 0x61FFF: FlushAllOutput (io.c:681)
==9999==    by 0x26BF3: Dispatch (dispatch.c:453)
==9999==    by 0x205E7: main (main.c:291)
==9999==  Address 0x5525c70 is 632 bytes inside a block of size 4,096 alloc'd
==9999==    at 0x48334A4: calloc (vg_replace_malloc.c:467)
==9999==    by 0x61E23: WriteToClient (io.c:1078)
==9999==    by 0x21517: ProcEstablishConnection (dispatch.c:3685)
==9999==    by 0x26CEB: Dispatch (dispatch.c:432)
==9999==    by 0x205E7: main (main.c:291)
==9999==  Uninitialised value was created by a stack allocation
==9999==    at 0xCA4E0: rrGetScreenResources (rrscreen.c:313)

Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
6 years agoxkb: Initialize pad bytes sent in replies of geometry requests.
Rami Ylimäki [Tue, 8 Mar 2011 14:57:19 +0000 (16:57 +0200)]
xkb: Initialize pad bytes sent in replies of geometry requests.

Valgrind complains about uninitialized data being written to clients.

Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agodebian/changelog: Memory leak fixes from upstream master.
Rami Ylimäki [Wed, 16 Mar 2011 09:44:11 +0000 (11:44 +0200)]
debian/changelog: Memory leak fixes from upstream 

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agomi/misprite: use memory management provided by dixRegisterPrivateKey
Erkki Seppälä [Wed, 9 Mar 2011 15:29:14 +0000 (17:29 +0200)]
mi/misprite: use memory management provided by dixRegisterPrivateKey

The record allocated by miSpriteDeviceCursorInitialize was not being
released.

This patch makes misprite use dixRegisterPrivateKey with the record
size argument, which handles the memory management
issues. miSpriteDeviceCursorInitialize is restructured to initialize
pCursorInfo only if miDCDeviceInitialize succeeds. The record itself
is zeroed on cleanup to ensure that the assumptions in the code still
hold.

Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoNOKIA: Release leaked option list on input device disconnect.
Rami Ylimäki [Thu, 3 Mar 2011 13:28:11 +0000 (15:28 +0200)]
NOKIA: Release leaked option list on input device disconnect.

Currently the list of device options generated in driver PreInit is
never released. For example, connecting and disconnecting a bluetooth
keyboard repeatedly causes a steadily growing memory leak.

This has been already fixed in 1.10 server. However, the upstream fix
is not compatible with 1.9 server.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
6 years agoconfig: Ensure that stolen option list elements are released.
Rami Ylimäki [Fri, 4 Mar 2011 15:55:33 +0000 (17:55 +0200)]
config: Ensure that stolen option list elements are released.

NewInputDeviceRequest steals the contents of option list elements but
doesn't use the elements themselves for anything. Therefore the list
elements need to be released always.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodix: Release input device config info when the device disconnects.
Rami Ylimäki [Fri, 4 Mar 2011 15:55:32 +0000 (17:55 +0200)]
dix: Release input device config info when the device disconnects.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoxkb: Ensure that XKB device private won't leak on device disconnect.
Rami Ylimäki [Fri, 4 Mar 2011 15:55:31 +0000 (17:55 +0200)]
xkb: Ensure that XKB device private won't leak on device disconnect.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoconfig: expose config_info as an input option.
Peter Hutterer [Wed, 21 Jul 2010 23:09:10 +0000 (09:09 +1000)]
config: expose config_info as an input option.

config_info is the only reliable indicator we have in the server for
duplicate devices (drivers can test for maj/min on fds as well). Don't set
this after the device has been initialized but assume it's important enough
to set during NIDR.

This makes the option "config_info" available to the drivers as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
6 years agoxfree86/common: Remove a configScreen leak when conf_screen is NULL
Erkki Seppälä [Tue, 8 Mar 2011 18:29:41 +0000 (13:29 -0500)]
xfree86/common: Remove a configScreen leak when conf_screen is NULL

configScreen used a dynamically allocated buffer for XF86ConfScreenRec
when conf_screen argument was NULL. This pointer was never stored
anywhere, nor was it released, so this patch makes the function use
automatically allocated storage in that situation.

[ajax: minor grammar fix]
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
6 years agodebian/changlog: upstream sync
Rami Ylimäki [Wed, 16 Mar 2011 09:11:42 +0000 (11:11 +0200)]
debian/changlog: upstream sync

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
6 years agoMerge commit 'fdo/server-1.9-branch' into valgrind
Rami Ylimäki [Wed, 16 Mar 2011 09:04:59 +0000 (11:04 +0200)]
Merge commit 'fdo/server-1.9-branch' into valgrind

6 years agoxfree86/modes: Fixed memory leak in xf86InitialConfiguration
Erkki Seppälä [Thu, 10 Mar 2011 09:40:40 +0000 (11:40 +0200)]
xfree86/modes: Fixed memory leak in xf86InitialConfiguration

There were two memory leaks in the function: one was the lack of free
for "enabled", the other was the full lack of releasing anything when
configuration was too small. The first issue was fixed by adding the
missing free, the other was addressed by replacing the duplicate
memory releasing sequences with one that is gotoed into.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit d3adf2d9350bee4125107e2ea1ed0c51bb736562)

6 years agovbe: Fix malloc size bug
Adam Jackson [Thu, 24 Feb 2011 21:06:34 +0000 (16:06 -0500)]
vbe: Fix malloc size bug

v2: Slightly more obvious sizing math.

==14882== Invalid write of size 2
==14882==    at 0x6750267: VBEGetVBEInfo (vbe.c:400)
==14882==    by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so)
==14882==    by 0x471895: InitOutput (xf86Init.c:519)
==14882==    by 0x422778: main (main.c:205)
==14882==  Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd
==14882==    at 0x4A0640D: malloc (vg_replace_malloc.c:236)
==14882==    by 0x675024B: VBEGetVBEInfo (vbe.c:398)
==14882==    by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so)
==14882==    by 0x471895: InitOutput (xf86Init.c:519)
==14882==    by 0x422778: main (main.c:205)

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit d8caa782009abf4dc17b945e325e83fda299a534)