Fix a panic introduced in r329225
Some GEOM partition tables may be destroyed with incomplete partition entries. Guard against this with NULL checks. Reported by: pholm,others Reviewed by: markj Tested by: pholm
This commit is contained in:
parent
f5ce166436
commit
d793587fe2
@ -1549,9 +1549,11 @@ g_part_wither(struct g_geom *gp, int error)
|
||||
while ((entry = LIST_FIRST(&table->gpt_entry)) != NULL) {
|
||||
LIST_REMOVE(entry, gpe_entry);
|
||||
pp = entry->gpe_pp;
|
||||
entry->gpe_pp->private = NULL;
|
||||
entry->gpe_pp = NULL;
|
||||
if (pp != NULL) {
|
||||
pp->private = NULL;
|
||||
g_wither_provider(pp, error);
|
||||
}
|
||||
g_free(entry);
|
||||
}
|
||||
G_PART_DESTROY(table, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user