summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorOliver McFadden <oliver.mcfadden@nokia.com>2009-07-16 18:57:49 +0300
committerOliver McFadden <oliver.mcfadden@nokia.com>2009-07-16 19:03:14 +0300
commit7333dc2969f60af0abcfb28e7182a5fff9918223 (patch)
tree9d43f43c70ecd2727a525bad011ccb7198cf1773 /dix
parent66eabbebaf1b40fed7670b7c05337ed6226dd81e (diff)
Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:
Event alloc_arg: Called allocation function "XIPropToInt" on "ptr" [details] 167 rc = XIPropToInt(val, &nelem, &ptr); Event leaked_storage: Variable "ptr" goes out of scope
Diffstat (limited to 'dix')
-rw-r--r--dix/ptrveloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 37c8e5178..1759f1053 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -155,6 +155,7 @@ AccelSetProfileProperty(DeviceIntPtr dev, Atom atom,
if (!vel)
return BadValue;
rc = XIPropToInt(val, &nelem, &ptr);
+ xfree(ptr);
if(checkOnly)
{
@@ -200,6 +201,7 @@ AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
if (!vel)
return BadValue;
rc = XIPropToFloat(val, &nelem, &ptr);
+ xfree(ptr);
if(checkOnly)
{
@@ -246,6 +248,7 @@ AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom,
if (!veloc)
return BadValue;
rc = XIPropToFloat(val, &nelem, &ptr);
+ xfree(ptr);
if(checkOnly)
{
@@ -292,6 +295,7 @@ AccelSetScaleProperty(DeviceIntPtr dev, Atom atom,
if (!vel)
return BadValue;
rc = XIPropToFloat(val, &nelem, &ptr);
+ xfree(ptr);
if (checkOnly)
{