Patchwork [12/16] vnc: fix tight png memory leak

login
register
mail settings
Submitter Corentin Chary
Date June 16, 2010, 7:12 a.m.
Message ID <1276672333-14831-13-git-send-email-corentincj@iksaif.net>
Download mbox | patch
Permalink /patch/55855/
State New
Headers show

Comments

Corentin Chary - June 16, 2010, 7:12 a.m.
The tight.png buffer was never released.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
 ui/vnc-enc-tight.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index dbde08d..1d926c9 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -1659,4 +1659,7 @@  void vnc_tight_clear(VncState *vs)
 #ifdef CONFIG_VNC_JPEG
     buffer_free(&vs->tight.jpeg);
 #endif
+#ifdef CONFIG_VNC_PNG
+    buffer_free(&vs->tight.png);
+#endif
 }