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
This commit is contained in:
Oliver McFadden 2009-07-16 18:57:49 +03:00
parent 66eabbebaf
commit 7333dc2969

View File

@ -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)
{