projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4170ae
)
terminal: verify grdev tiles are correctly linked
author
David Herrmann
<dh.herrmann@gmail.com>
Tue, 23 Sep 2014 11:40:18 +0000
(13:40 +0200)
committer
David Herrmann
<dh.herrmann@gmail.com>
Tue, 23 Sep 2014 18:05:45 +0000
(20:05 +0200)
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.
src/libsystemd-terminal/grdev.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-terminal/grdev.c
b/src/libsystemd-terminal/grdev.c
index
80a71be
..
fa1fc37
100644
(file)
--- a/
src/libsystemd-terminal/grdev.c
+++ b/
src/libsystemd-terminal/grdev.c
@@
-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);