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:
David Herrmann 2014-09-23 13:40:18 +02:00
parent b4170aed36
commit c5e6bfc6bc

View file

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