mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Memory leak.
This commit is contained in:
parent
a4f5d127e2
commit
4573ef1869
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-command-prompt.c,v 1.14 2009-02-13 18:57:55 nicm Exp $ */
|
||||
/* $Id: cmd-command-prompt.c,v 1.15 2009-02-16 18:57:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -112,8 +112,10 @@ cmd_command_prompt_callback(void *data, const char *s)
|
||||
char *cause, *ptr, *buf, ch;
|
||||
size_t len, slen;
|
||||
|
||||
if (s == NULL)
|
||||
if (s == NULL) {
|
||||
xfree(cdata);
|
||||
return (0);
|
||||
}
|
||||
slen = strlen(s);
|
||||
|
||||
len = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-list.c,v 1.2 2009-01-19 18:23:40 nicm Exp $ */
|
||||
/* $Id: cmd-list.c,v 1.3 2009-02-16 18:57:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -47,10 +47,8 @@ cmd_list_parse(int argc, char **argv, char **cause)
|
||||
}
|
||||
|
||||
cmd = cmd_parse(argc - lastsplit, argv + lastsplit, cause);
|
||||
if (cmd == NULL) {
|
||||
cmd_list_free(cmdlist);
|
||||
return (NULL);
|
||||
}
|
||||
if (cmd == NULL)
|
||||
goto bad;
|
||||
TAILQ_INSERT_TAIL(cmdlist, cmd, qentry);
|
||||
|
||||
return (cmdlist);
|
||||
|
Loading…
Reference in New Issue
Block a user