1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Check lv pointer for NULL before derefence.

This commit is contained in:
Zdenek Kabelac 2011-12-21 12:59:22 +00:00
parent 0190769d4f
commit d3b4a0f322
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Do not derefence lv pointer in _percent_run() function before NULL check.
Allow empty strings for description and creation_host config fields.
Issue deprecation warning when removing last lvm1-format snapshot.
Reinstate support for snapshot removal with lvm1 format. (2.02.86)

View File

@ -507,7 +507,7 @@ static int _percent_run(struct dev_manager *dm, const char *name,
uint64_t start, length;
char *type = NULL;
char *params = NULL;
const struct dm_list *segh = &lv->segments;
const struct dm_list *segh = lv ? &lv->segments : NULL;
struct lv_segment *seg = NULL;
struct segment_type *segtype;
int first_time = 1;