diff options
author | Bastian Stender <bst@pengutronix.de> | 2017-02-23 17:45:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-24 08:24:35 +0100 |
commit | 43f2decf5be47595036994672b2c9cc84fab86ee (patch) | |
tree | ce41d60912fc467ab2687a9abcec127a7ecb1354 | |
parent | 11f1728318fe2612ba496558e32245fa915a0961 (diff) | |
download | barebox-43f2decf5be47595036994672b2c9cc84fab86ee.tar.gz barebox-43f2decf5be47595036994672b2c9cc84fab86ee.tar.xz |
graphic_utils: do not allocate info in fb_open
info was errorneously allocated, but it really is a pointer to a fb_info
struct from the framebuffer. This fixes a memory leak.
Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | lib/gui/graphic_utils.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c index f6ab5ea0d1..7d238e9ff9 100644 --- a/lib/gui/graphic_utils.c +++ b/lib/gui/graphic_utils.c @@ -277,8 +277,6 @@ struct screen *fb_open(const char * fbdev) if (fd < 0) return ERR_PTR(fd); - info = xzalloc(sizeof(*info)); - ret = ioctl(fd, FBIOGET_SCREENINFO, &info); if (ret) { goto failed_screeninfo; @@ -291,7 +289,6 @@ struct screen *fb_open(const char * fbdev) } sc->fd = fd; - sc->info = info; return sc; |