mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Check and free the actual pointer the was used in a malloc instead of
checking and freeing a different pointer that may or may not have been assigned the same value. This should fix panics under load that were recently reported.
This commit is contained in:
parent
6b40af88db
commit
d488190531
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126461
@ -1554,8 +1554,8 @@ mlx_enquire(struct mlx_softc *sc, int command, size_t bufsize, void (* complete)
|
|||||||
if ((mc->mc_complete == NULL) && (mc != NULL))
|
if ((mc->mc_complete == NULL) && (mc != NULL))
|
||||||
mlx_releasecmd(mc);
|
mlx_releasecmd(mc);
|
||||||
/* we got an error, and we allocated a result */
|
/* we got an error, and we allocated a result */
|
||||||
if ((error != 0) && (mc->mc_data != NULL)) {
|
if ((error != 0) && (result != NULL)) {
|
||||||
free(mc->mc_data, M_DEVBUF);
|
free(result, M_DEVBUF);
|
||||||
mc->mc_data = NULL;
|
mc->mc_data = NULL;
|
||||||
}
|
}
|
||||||
return(result);
|
return(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user