aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrproviderproperty.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-07 08:28:39 +0200
committermarha <marha@users.sourceforge.net>2012-08-07 08:28:39 +0200
commit666141b21e89c617ca466af62ebcb56dc4f5450c (patch)
tree4d0cddde47b6d8cbc92395dc2091849f89d68138 /xorg-server/randr/rrproviderproperty.c
parente158f8fc4a9cf2f884d156ff2dfc0870facfbcba (diff)
parentf8e35ebbe71eed74ccf68af8ccda4182f1edc7f0 (diff)
downloadvcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.gz
vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.bz2
vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/hw/xwin/glx/indirect.c xorg-server/hw/xwin/winclipboardwndproc.c xorg-server/hw/xwin/winmultiwindowicons.c xorg-server/hw/xwin/winmultiwindowwindow.c xorg-server/hw/xwin/winmultiwindowwm.c xorg-server/hw/xwin/winwin32rootlesswindow.c xorg-server/hw/xwin/winwindow.h
Diffstat (limited to 'xorg-server/randr/rrproviderproperty.c')
-rw-r--r--xorg-server/randr/rrproviderproperty.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xorg-server/randr/rrproviderproperty.c b/xorg-server/randr/rrproviderproperty.c
index a24d9d784..be54f259e 100644
--- a/xorg-server/randr/rrproviderproperty.c
+++ b/xorg-server/randr/rrproviderproperty.c
@@ -216,6 +216,8 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
if (pending && pScrPriv->rrProviderSetProperty &&
!pScrPriv->rrProviderSetProperty(provider->pScreen, provider,
prop->propertyName, &new_value)) {
+ if (add)
+ RRDestroyProviderProperty(prop);
free(new_value.data);
return BadValue;
}
@@ -342,12 +344,18 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
/*
* ranges must have even number of values
*/
- if (range && (num_values & 1))
+ if (range && (num_values & 1)) {
+ if (add)
+ RRDestroyProviderProperty(prop);
return BadMatch;
+ }
new_values = malloc(num_values * sizeof(INT32));
- if (!new_values && num_values)
+ if (!new_values && num_values) {
+ if (add)
+ RRDestroyProviderProperty(prop);
return BadAlloc;
+ }
if (num_values)
memcpy(new_values, values, num_values * sizeof(INT32));