diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-09-19 08:12:40 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-09-19 08:12:40 +0000 |
commit | c50f458bf68ed947aec566fa6c10b56cbecc1120 (patch) | |
tree | 672baa60c8f132dfcf7e9cf39bb81f902c2a056a /sys/arch/armv7/omap | |
parent | 85f205a51a56e6c7a8afdec45d5d25ea59f62c6a (diff) |
Free edid_buf after use so to fix possible memory leak.
With and ok jsg@
Diffstat (limited to 'sys/arch/armv7/omap')
-rw-r--r-- | sys/arch/armv7/omap/amdisplay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/armv7/omap/amdisplay.c b/sys/arch/armv7/omap/amdisplay.c index c61446f88f7..d61d3fdcec1 100644 --- a/sys/arch/armv7/omap/amdisplay.c +++ b/sys/arch/armv7/omap/amdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdisplay.c,v 1.7 2017/10/25 14:34:22 kettenis Exp $ */ +/* $OpenBSD: amdisplay.c,v 1.8 2018/09/19 08:12:39 claudio Exp $ */ /* * Copyright (c) 2016 Ian Sutton <ians@openbsd.org> * @@ -219,6 +219,8 @@ amdisplay_attach(struct device *parent, struct device *self, void *args) return; } + free(edid_buf, M_DEVBUF, EDID_LENGTH); + #ifdef LCD_DEBUG edid_print(&sc->sc_edid); #endif @@ -246,7 +248,6 @@ amdisplay_attach(struct device *parent, struct device *self, void *args) /* configure DMA framebuffer */ if (amdisplay_setup_dma(sc)) { printf("%s: couldn't allocate DMA framebuffer\n", DEVNAME(sc)); - free(edid_buf, M_DEVBUF, EDID_LENGTH); amdisplay_detach(self, 0); return; } |