diff options
author | 2020-03-19 16:17:51 +0000 | |
---|---|---|
committer | 2020-03-19 16:17:51 +0000 | |
commit | 1be66a576bd5423b2894addce94ba9b1659ef0ab (patch) | |
tree | 5cda9bd460348dd099724959233abbe1becd3d69 | |
parent | Use bv_name() in debug output and include the hash of a map. (diff) | |
download | wireguard-openbsd-1be66a576bd5423b2894addce94ba9b1659ef0ab.tar.xz wireguard-openbsd-1be66a576bd5423b2894addce94ba9b1659ef0ab.zip |
Plug memory leak of psensor if read_sensor does not return zero.
CID 1491654
ok mpi@ kn@ florian@
-rw-r--r-- | sys/dev/ipmi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index 3419b17d51a..aa575e62785 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipmi.c,v 1.110 2020/03/09 04:51:24 yasuoka Exp $ */ +/* $OpenBSD: ipmi.c,v 1.111 2020/03/19 16:17:51 tracey Exp $ */ /* * Copyright (c) 2015 Masao Uebayashi @@ -1411,7 +1411,8 @@ add_child_sensors(struct ipmi_softc *sc, u_int8_t *psdr, int count, dbg_printf(5, " reading: %lld [%s]\n", psensor->i_sensor.value, psensor->i_sensor.desc); - } + } else + free(psensor, M_DEVBUF, sizeof(*psensor)); } return (1); |