diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-24 11:42:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-24 11:42:03 +0000 |
commit | 1f10f6ea8b7208efa3689ca1e0073a791777cb40 (patch) | |
tree | 7ed985155b03b0b7a61341c4b0693003f8efd1ea /tmux.c | |
parent | 810a8846b7517bd8d2a9274fd16145f165a989d4 (diff) | |
download | rtmux-1f10f6ea8b7208efa3689ca1e0073a791777cb40.tar.gz rtmux-1f10f6ea8b7208efa3689ca1e0073a791777cb40.tar.bz2 rtmux-1f10f6ea8b7208efa3689ca1e0073a791777cb40.zip |
Close memory leaks.
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.37 2007-10-24 11:21:29 nicm Exp $ */ +/* $Id: tmux.c,v 1.38 2007-10-24 11:42:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -238,7 +238,12 @@ main(int argc, char **argv) client_write_server2(&cctx, MSG_COMMAND, &data, sizeof data, BUFFER_OUT(b), BUFFER_USED(b)); buffer_destroy(b); - + + if (path != NULL) + xfree(path); + if (name != NULL) + xfree(name); + for (;;) { pfd.fd = cctx.srv_fd; pfd.events = POLLIN; @@ -290,6 +295,12 @@ main(int argc, char **argv) } out: + xfree(default_command); + + close(cctx.srv_fd); + buffer_destroy(cctx.srv_in); + buffer_destroy(cctx.srv_out); + #ifdef DEBUG xmalloc_report(getpid(), "client"); #endif |