Update of /cvsroot/tmux/tmux/compat
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31581

Modified Files:
        imsg.c 
Log Message:
Whoops, get the logic the right way round.


Index: imsg.c
===================================================================
RCS file: /cvsroot/tmux/tmux/compat/imsg.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- imsg.c      11 Nov 2010 20:41:08 -0000      1.6
+++ imsg.c      13 Nov 2010 16:29:05 -0000      1.7
@@ -111,7 +111,7 @@
                return (0);
        datalen = imsg->hdr.len - IMSG_HEADER_SIZE;
        ibuf->r.rptr = ibuf->r.buf + IMSG_HEADER_SIZE;
-       if (datalen != 0 && (imsg->data = malloc(datalen + 1)) == NULL)
+       if ((imsg->data = malloc(datalen)) == NULL && datalen != 0)
                return (-1);
 
        if (imsg->hdr.flags & IMSGF_HASFD)


------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to