Update of /cvsroot/tmux/tmux
In directory vz-cvs-2.sog:/tmp/cvs-serv32220

Modified Files:
        cmd-capture-pane.c 
Log Message:
Sync OpenBSD patchset 907:

Fix a couple of memory leaks, from Tiago Cunha.


Index: cmd-capture-pane.c
===================================================================
RCS file: /cvsroot/tmux/tmux/cmd-capture-pane.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmd-capture-pane.c  6 Apr 2011 22:19:42 -0000       1.7
+++ cmd-capture-pane.c  18 May 2011 20:31:00 -0000      1.8
@@ -60,9 +60,10 @@
        len = 0;
 
        n = args_strtonum(args, 'S', SHRT_MIN, SHRT_MAX, &cause);
-       if (cause != NULL)
+       if (cause != NULL) {
                top = gd->hsize;
-       else if (n < 0 && (u_int) -n > gd->hsize)
+               xfree(cause);
+       } else if (n < 0 && (u_int) -n > gd->hsize)
                top = 0;
        else
                top = gd->hsize + n;
@@ -70,9 +71,10 @@
                top = gd->hsize + gd->sy - 1;
 
        n = args_strtonum(args, 'E', SHRT_MIN, SHRT_MAX, &cause);
-       if (cause != NULL)
+       if (cause != NULL) {
                bottom = gd->hsize + gd->sy - 1;
-       else if (n < 0 && (u_int) -n > gd->hsize)
+               xfree(cause);
+       } else if (n < 0 && (u_int) -n > gd->hsize)
                bottom = 0;
        else
                bottom = gd->hsize + n;


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to