summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-08-07 14:29:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-08-20 12:57:07 +0200
commiteac28050d0838da535ccd8e41ea3975f6143ff7b (patch)
tree345a27601208f823f8a000b7e75b31f4f5377844 /lib
parent5c12f6b9f19269fffabb9e03f970f606c48a39b3 (diff)
downloadbarebox-eac28050d0838da535ccd8e41ea3975f6143ff7b.tar.gz
barebox-eac28050d0838da535ccd8e41ea3975f6143ff7b.tar.xz
fb: return original fb_info in FBIOGET_SCREENINFO
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/gui/graphic_utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
index 47003a0837..f928ee16f4 100644
--- a/lib/gui/graphic_utils.c
+++ b/lib/gui/graphic_utils.c
@@ -281,7 +281,7 @@ struct screen *fb_open(const char * fbdev, bool offscreen)
info = xzalloc(sizeof(*info));
- ret = ioctl(fd, FBIOGET_SCREENINFO, info);
+ ret = ioctl(fd, FBIOGET_SCREENINFO, &info);
if (ret) {
goto failed_screeninfo;
}
@@ -310,10 +310,8 @@ void fb_close(struct screen *sc)
{
free(sc->offscreenbuf);
- if (sc->fd > 0) {
+ if (sc->fd > 0)
close(sc->fd);
- free(sc->info);
- }
free(sc);
}