diff options
author | Nils Wallménius <nils@rockbox.org> | 2010-09-08 19:53:50 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2010-09-08 19:53:50 +0000 |
commit | 4120652df4820a3db46a9693a8dd3ab50ca75530 (patch) | |
tree | 803364fcf04fafed4bb3039f2f1e48c3be2a664e /apps/plugins | |
parent | f09499f70ff7183415073af61174b0ea2915373f (diff) | |
download | rockbox-4120652df4820a3db46a9693a8dd3ab50ca75530.tar.gz rockbox-4120652df4820a3db46a9693a8dd3ab50ca75530.zip |
keybox: do not leak filehandle when the wrong password is entered.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28047 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/keybox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 8ac4064996..af41b3fdd8 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c @@ -554,10 +554,10 @@ static int keybox(void) return FILE_OPEN_ERROR; bytes_read = rb->read(fd, &buffer, sizeof(buffer)); + rb->close(fd); + if (parse_buffer()) return 0; - - rb->close(fd); } while (!done) |