Commit ba0f5d85 authored by Dave Airlie's avatar Dave Airlie
Browse files

devices: break after finding and removing device from lists



Coverity complains about a use after free in here after the
freeing, I can't follow the linked list so well, but whot
says the device can only be on one list once, so break should
fix it.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c4591ea1
Pipeline #4283 passed with stage
in 7 minutes and 2 seconds
......@@ -1177,6 +1177,7 @@ RemoveDevice(DeviceIntPtr dev, BOOL sendevent)
flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved;
CloseDevice(tmp);
ret = Success;
break;
}
}
......@@ -1193,6 +1194,7 @@ RemoveDevice(DeviceIntPtr dev, BOOL sendevent)
prev->next = next;
ret = Success;
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment