diff options
author | Karel Zak | 2019-05-06 12:39:07 +0200 |
---|---|---|
committer | Karel Zak | 2019-05-06 12:39:07 +0200 |
commit | f6f8a671a9a45125b6261c08b849833bce0f39a8 (patch) | |
tree | a75b8362e4571f40787f61d59704a45199a0b090 /misc-utils | |
parent | libsmartcols: cell width calulation cleanup (diff) | |
download | kernel-qcow2-util-linux-f6f8a671a9a45125b6261c08b849833bce0f39a8.tar.gz kernel-qcow2-util-linux-f6f8a671a9a45125b6261c08b849833bce0f39a8.tar.xz kernel-qcow2-util-linux-f6f8a671a9a45125b6261c08b849833bce0f39a8.zip |
lsblk: fix heap-use-after-free
Addresses: https://github.com/karelzak/util-linux/issues/787
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/lsblk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 34a6cd9ca..30d5d9b4e 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -1560,6 +1560,7 @@ static int process_all_devices(struct lsblk_devtree *tr) if (is_maj_excluded(dev->maj) || !is_maj_included(dev->maj)) { DBG(DEV, ul_debug(" %s: ignore (by filter)", d->d_name)); lsblk_devtree_remove_device(tr, dev); + dev = NULL; goto next; } |