diff options
author | Lioncash <mathew1800@gmail.com> | 2017-05-10 10:58:55 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2017-05-10 10:59:16 -0400 |
commit | c550e1ac697f14da594a6c8f5a83ffdabd046847 (patch) | |
tree | 63b4440ee50f895313787d329f6faebc8922702d | |
parent | c80879ee69bcad51564b8b183f63131934006bf5 (diff) | |
download | libtdevnc-c550e1ac697f14da594a6c8f5a83ffdabd046847.tar.gz libtdevnc-c550e1ac697f14da594a6c8f5a83ffdabd046847.zip |
font: Fix a small resource leak in a failure case in rfbLoadConsoleFont()
The file handle wouldn't be closed in this instance.
-rw-r--r-- | libvncserver/font.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libvncserver/font.c b/libvncserver/font.c index a9091d2..9935e91 100644 --- a/libvncserver/font.c +++ b/libvncserver/font.c @@ -174,6 +174,7 @@ rfbFontDataPtr rfbLoadConsoleFont(char *filename) if(1!=fread(p->data,4096,1,f)) { free(p->data); free(p); + fclose(f); return NULL; } fclose(f); |