diff options
author | 2020-12-07 14:54:46 +0000 | |
---|---|---|
committer | 2020-12-07 08:00:32 -0700 | |
commit | 733c15bd3a944b8eeaacdddf061759b6a83dd3f4 (patch) | |
tree | eb2e3e2f2ab8a6c2eefcebd373d2dba1b172336f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name (diff) | |
download | wireguard-linux-733c15bd3a944b8eeaacdddf061759b6a83dd3f4.tar.xz wireguard-linux-733c15bd3a944b8eeaacdddf061759b6a83dd3f4.zip |
block/rnbd: fix a null pointer dereference on dev->blk_symlink_name
Currently in the case where dev->blk_symlink_name fails to be allocates
the error return path attempts to set an end-of-string character to
the unallocated dev->blk_symlink_name causing a null pointer dereference
error. Fix this by returning with an explicity ENOMEM error (which also
is missing in the original code as was not initialized).
Fixes: 1eb54f8f5dd8 ("block/rnbd: client: sysfs interface functions")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Dereference after null check")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions