LVM2/lib/filters filter-persistent.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2009-07-08 18:13:32
Modified files:
lib/filters : filter-persistent.c
Log message:
Fix segfault in persistent_filter_dump() if lvm init fails. Just return_0 in persistent_filter_dump() if passed a NULL filter;
lib/filters/filter-persistent.c +5 -1
@@ -177,7 +177,7 @@int persistent_filter_dump (struct dev_filter *f) { -struct pfilter *pf = (struct pfilter *) f->private; +struct pfilter *pf;char *tmp_file;struct stat info, info2;struct config_tree *cft =NULL ;
@@ -185,6 +185,10 @@int lockfd;int r =0 ; +if (!f) + return_0; + pf = (struct pfilter *) f->private; +if (!dm_hash_get_num_entries (pf->devices)) {log_very_verbose ("Internal persistent device cache empty " "- not writing to %s" , pf->file);