mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
ecc9f74988
When using a global_filter and if this filter is incorrectly specified, we ended up with a segfault: raw/~ $ pvs Invalid filter pattern "r|/dev/sda". Segmentation fault (core dumped) In the example above a closing '|' character is missing at the end of the regex. The segfault itself was caused by trying to destroy the same filter twice in _init_filters fn within the error path (the "bad" goto target): bad: if (f3) f3->destroy(f3); if (f4) f4->destroy(f4); Where f3 is the composite filter (sysfs + regex + type + md + mpath filter) and f4 is the persistent filter which encompasses this composite filter within persistent filter's 'real' field in 'struct pfilter'. So in the end, we need to destroy the persistent filter only as this will also destroy any 'real' filter attached to it. |
||
---|---|---|
.. | ||
toolcontext.c | ||
toolcontext.h |