$ git clone http://tcclient.ion.nu/tc_client.git
commit fbcb2abf4435c58ebc46b2baa7957212921c3ab9
Author: Alicia <...>
Date:   Sat Feb 27 19:21:36 2016 +0100

    tc_client-gtk: fixed a memory leak.

diff --git a/ChangeLog b/ChangeLog
index cc1d6c9..a32d61c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ tc_client-gtk: added input history (up/down arrows)
 tc_client-gtk: set a default position of the cam and nickname list pane handles.
 tc_client-gtk: use --hexcolors to show the full range of colors.
 tc_client-gtk: keep cam pixel buffers on the heap instead of the stack, fixes glitchyness when resizing.
+tc_client-gtk: fixed a memory leak.
 modbot: use youtube-dl's 'ytsearch:' instead of '--default-search auto', fixes issues with search terms that include slashes.
 configure: check for multiple versions of ncurses.
 0.37:
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index 022fc29..be7eecd 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -117,8 +117,10 @@ void updatescaling(struct viddata* data, unsigned int width, unsigned int height
   {
     GdkPixbuf* pixbuf=gtk_image_get_pixbuf(GTK_IMAGE(cams[i].cam));
     if(!pixbuf){continue;}
+    GdkPixbuf* old=pixbuf;
     pixbuf=gdk_pixbuf_scale_simple(pixbuf, data->scalewidth, data->scaleheight, GDK_INTERP_BILINEAR);
     gtk_image_set_from_pixbuf(GTK_IMAGE(cams[i].cam), pixbuf);
+    g_object_unref(old);
   }
 }
 
@@ -607,8 +609,10 @@ gboolean handledata(GIOChannel* iochannel, GIOCondition condition, gpointer data
   sws_scale(swsctx, (const uint8_t*const*)cam->frame->data, cam->frame->linesize, 0, cam->frame->height, cam->dstframe->data, cam->dstframe->linesize);
   sws_freeContext(swsctx);
 
+  GdkPixbuf* oldpixbuf=gtk_image_get_pixbuf(GTK_IMAGE(cam->cam));
   GdkPixbuf* gdkframe=gdk_pixbuf_new_from_data(cam->dstframe->data[0], GDK_COLORSPACE_RGB, 0, 8, scalewidth, scaleheight, cam->dstframe->linesize[0], freebuffer, 0);
   gtk_image_set_from_pixbuf(GTK_IMAGE(cam->cam), gdkframe);
+  g_object_unref(oldpixbuf);
 
   return 1;
 }