Revision: 2594
http://tmux.svn.sourceforge.net/tmux/?rev=2594&view=rev
Author: tcunha
Date: 2011-09-21 16:34:04 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Sync OpenBSD patchset 955:
Plug memory leak, from Tiago Cunha.
Modified Paths:
--------------
trunk/cmd-split-window.c
Modified: trunk/cmd-split-window.c
===================================================================
--- trunk/cmd-split-window.c 2011-09-21 16:33:19 UTC (rev 2593)
+++ trunk/cmd-split-window.c 2011-09-21 16:34:04 UTC (rev 2594)
@@ -57,7 +57,7 @@
struct window *w;
struct window_pane *wp, *new_wp = NULL;
struct environ env;
- char *cmd, *cwd, *cause;
+ char *cmd, *cwd, *cause, *new_cause;
const char *shell;
u_int hlimit, paneidx;
int size, percentage;
@@ -93,16 +93,18 @@
if (args_has(args, 'l')) {
size = args_strtonum(args, 'l', 0, INT_MAX, &cause);
if (cause != NULL) {
- ctx->error(ctx, "size %s", cause);
+ xasprintf(&new_cause, "size %s", cause);
xfree(cause);
- return (-1);
+ cause = new_cause;
+ goto error;
}
} else if (args_has(args, 'p')) {
percentage = args_strtonum(args, 'p', 0, INT_MAX, &cause);
if (cause != NULL) {
- ctx->error(ctx, "percentage %s", cause);
+ xasprintf(&new_cause, "percentage %s", cause);
xfree(cause);
- return (-1);
+ cause = new_cause;
+ goto error;
}
if (type == LAYOUT_TOPBOTTOM)
size = (wp->sy * percentage) / 100;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs