diff options
author | marha <marha@users.sourceforge.net> | 2012-08-07 07:51:02 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-07 07:51:02 +0200 |
commit | f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0 (patch) | |
tree | 0451299b4aaaaf6d2423d1faf07dc9f35c9f80d8 /xorg-server/randr/rrproviderproperty.c | |
parent | 18e75aa6ae27a6e44d93babd96afbbe0cd6077c8 (diff) | |
download | vcxsrv-f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0.tar.gz vcxsrv-f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0.tar.bz2 vcxsrv-f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0.zip |
mesa xserver xkeyboard-config git update 7 Aug 2012
Diffstat (limited to 'xorg-server/randr/rrproviderproperty.c')
-rw-r--r-- | xorg-server/randr/rrproviderproperty.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xorg-server/randr/rrproviderproperty.c b/xorg-server/randr/rrproviderproperty.c index e0a814ff8..ab601da9a 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)); |