diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-19 05:38:41 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-19 05:38:41 -0500 |
commit | a4c1270ef0a3c5bd610b13867be7616a55e59dc5 (patch) | |
tree | 139609dc74ef49740509008c00529ccff489cfc0 /swaymsg | |
parent | f35575f71dfab5be9a935bc5e21ca5ee5dc4c2c2 (diff) |
fix memory leak in swaymsg
Diffstat (limited to 'swaymsg')
-rw-r--r-- | swaymsg/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index dfc175a8..b431872a 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -308,9 +308,11 @@ int main(int argc, char **argv) { } free(cmdtype); - char *command = strdup(""); + char *command = NULL; if (optind < argc) { command = join_args(argv + optind, argc - optind); + } else { + command = strdup(""); } int ret = 0; |