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:
parent
66eabbebaf
commit
7333dc2969
|
@ -155,6 +155,7 @@ AccelSetProfileProperty(DeviceIntPtr dev, Atom atom,
|
||||||
if (!vel)
|
if (!vel)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
rc = XIPropToInt(val, &nelem, &ptr);
|
rc = XIPropToInt(val, &nelem, &ptr);
|
||||||
|
xfree(ptr);
|
||||||
|
|
||||||
if(checkOnly)
|
if(checkOnly)
|
||||||
{
|
{
|
||||||
|
@ -200,6 +201,7 @@ AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
|
||||||
if (!vel)
|
if (!vel)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
rc = XIPropToFloat(val, &nelem, &ptr);
|
rc = XIPropToFloat(val, &nelem, &ptr);
|
||||||
|
xfree(ptr);
|
||||||
|
|
||||||
if(checkOnly)
|
if(checkOnly)
|
||||||
{
|
{
|
||||||
|
@ -246,6 +248,7 @@ AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom,
|
||||||
if (!veloc)
|
if (!veloc)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
rc = XIPropToFloat(val, &nelem, &ptr);
|
rc = XIPropToFloat(val, &nelem, &ptr);
|
||||||
|
xfree(ptr);
|
||||||
|
|
||||||
if(checkOnly)
|
if(checkOnly)
|
||||||
{
|
{
|
||||||
|
@ -292,6 +295,7 @@ AccelSetScaleProperty(DeviceIntPtr dev, Atom atom,
|
||||||
if (!vel)
|
if (!vel)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
rc = XIPropToFloat(val, &nelem, &ptr);
|
rc = XIPropToFloat(val, &nelem, &ptr);
|
||||||
|
xfree(ptr);
|
||||||
|
|
||||||
if (checkOnly)
|
if (checkOnly)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue