g_sched_destroy(): prevent return of uninitialized scalar variable.
For the !gsp case there some chance of returning an uninitialized return value. Prevent that from happening by initializing the error value. CID: 1006421
This commit is contained in:
parent
2421c6baf2
commit
858326e785
@ -1316,7 +1316,8 @@ g_sched_destroy(struct g_geom *gp, boolean_t force)
|
||||
gsp->gs_fini(sc->sc_data);
|
||||
g_gsched_unref(gsp);
|
||||
sc->sc_gsched = NULL;
|
||||
}
|
||||
} else
|
||||
error = 0;
|
||||
|
||||
if ((sc->sc_flags & G_SCHED_PROXYING) && oldpp) {
|
||||
error = g_destroy_proxy(gp, oldpp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user