Systemd/src/cgtop
Naohiro Aota 80b2ab4bc0 cgtop: initialize `ours' to NULL properly (#3139)
Running cgtop on a system, which lacks expecting stat file, results in a
segfault. For example, a system with blkio tree but without cfq io scheduler,
lacks "blkio.io_service_bytes".

When the targeting cgroup's file does not exist, process() returns 0 and
also does not modify `*ret' value (which is `*ours'). As a result,
callers of refresh_one() can have bogus pointer, which result in SEGV.

This patch just properly initialize the variable to NULL.
2016-04-28 11:41:50 -04:00
..
cgtop.c cgtop: initialize `ours' to NULL properly (#3139) 2016-04-28 11:41:50 -04:00
Makefile build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00