Patchwork [v2,12/18] vnc: fix tight png memory leak

login
register
mail settings
Submitter Corentin Chary
Date July 7, 2010, 6:58 p.m.
Message ID <1278529086-10391-13-git-send-email-corentincj@iksaif.net>
Download mbox | patch
Permalink /patch/58156/
State New
Headers show

Comments

Corentin Chary - July 7, 2010, 6:58 p.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 52b81f3..3f19df2 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -1674,4 +1674,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
 }