From 7333dc2969f60af0abcfb28e7182a5fff9918223 Mon Sep 17 00:00:00 2001 From: Oliver McFadden Date: Thu, 16 Jul 2009 18:57:49 +0300 Subject: 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 --- dix/ptrveloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dix') 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) { -- cgit v1.2.3