=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- src/usr.bin/tmux/tmux.c 2012/06/18 13:16:42 1.111 +++ src/usr.bin/tmux/tmux.c 2012/07/10 11:53:01 1.112 @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.111 2012/06/18 13:16:42 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.112 2012/07/10 11:53:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -73,7 +73,7 @@ if (debug_level > 0) { xasprintf(&path, "tmux-%s-%ld.log", name, (long) getpid()); log_open(debug_level, path); - xfree(path); + free(path); } } @@ -252,8 +252,7 @@ flags &= ~IDENTIFY_256COLOURS; break; case 'c': - if (shell_cmd != NULL) - xfree(shell_cmd); + free(shell_cmd); shell_cmd = xstrdup(optarg); break; case 'C': @@ -263,24 +262,21 @@ flags |= IDENTIFY_CONTROL; break; case 'f': - if (cfg_file != NULL) - xfree(cfg_file); + free(cfg_file); cfg_file = xstrdup(optarg); break; case 'l': login_shell = 1; break; case 'L': - if (label != NULL) - xfree(label); + free(label); label = xstrdup(optarg); break; case 'q': quiet = 1; break; case 'S': - if (path != NULL) - xfree(path); + free(path); path = xstrdup(optarg); break; case 'u': @@ -360,7 +356,7 @@ } xasprintf(&cfg_file, "%s/%s", home, DEFAULT_CFG); if (access(cfg_file, R_OK) != 0 && errno == ENOENT) { - xfree(cfg_file); + free(cfg_file); cfg_file = NULL; } } @@ -387,11 +383,10 @@ } } } - if (label != NULL) - xfree(label); + free(label); if (realpath(path, socket_path) == NULL) strlcpy(socket_path, path, sizeof socket_path); - xfree(path); + free(path); /* Set process title. */ setproctitle("%s (%s)", __progname, socket_path);