mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 17:38:42 +00:00
terminal: verify grdev tiles are correctly linked
We used to set "pipe->tile = tile" inside of the leaf allocation. We no longer do that. Verify that "out" is non-NULL, otherwise we'd leak memory. This is currently always given, but make sure to add an assert(), so coverity does not complain.
This commit is contained in:
@@ -158,6 +158,7 @@ int grdev_tile_new_leaf(grdev_tile **out, grdev_pipe *pipe) {
|
||||
_cleanup_(grdev_tile_freep) grdev_tile *tile = NULL;
|
||||
int r;
|
||||
|
||||
assert_return(out, -EINVAL);
|
||||
assert_return(pipe, -EINVAL);
|
||||
assert_return(!pipe->tile, -EINVAL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user