mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
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
ae26eab161
commit
21ff1f7469
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297526
@ -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…
Reference in New Issue
Block a user