diff options
| author | Sergey Senozhatsky <[email protected]> | 2017-09-26 06:25:10 +0000 |
|---|---|---|
| committer | Rob Herring <[email protected]> | 2017-10-12 17:22:04 +0000 |
| commit | db179e0d0d1003f10b798e072524be6bcdae5053 (patch) | |
| tree | 1fd0391e582a81d8a3a6d34872a4d0eed3a67118 /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
| parent | Linux 4.14-rc4 (diff) | |
| download | kernel-db179e0d0d1003f10b798e072524be6bcdae5053.tar.gz kernel-db179e0d0d1003f10b798e072524be6bcdae5053.zip | |
of: do not leak console options
Do not strdup() console options. It seems that the only reason for
it to be strdup()-ed was a compilation warning: printk, UART and
console drivers, for some reason, expect char pointer instead of
const char pointer. So we can just pass `of_stdout_options', but
need to cast it to char pointer. A better fix would be to change
printk, console drivers and UART to accept const char `options';
but that will take time - there are lots of drivers to update.
The patch also fixes a possible memory leak: add_preferred_console()
can fail, but we don't kfree() options.
Signed-off-by: Sergey Senozhatsky <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions
