about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-04-28 19:08:31 +0100
committerJames Booth <boothj5@gmail.com>2012-04-28 19:08:31 +0100
commit2b51d416317e69bdb9f34ec9035fe3af51627a0c (patch)
tree38ff16508add540e48aae8659595ef100263d9ca
parent3fa7931d53c9f90fe561eb51d966a878a23b12b8 (diff)
downloadprofani-tty-2b51d416317e69bdb9f34ec9035fe3af51627a0c.tar.gz
Revert "Free split args in command.c"
This reverts commit 161157a1c868746d052924bd590c5cfd9f7a75f7.
-rw-r--r--command.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/command.c b/command.c
index 5ecb015e..de36e732 100644
--- a/command.c
+++ b/command.c
@@ -81,10 +81,8 @@ static struct command_t _parse_command(char *str)
     struct command_t cmd;
     char **split = g_strsplit(str, " ", 0);
 
-    cmd.command = malloc((strlen(split[0]) + 1) * sizeof(char));
-    strcpy(cmd.command, split[0]);
+    cmd.command = split[0];
     cmd.params = NULL;
-    g_strfreev(split);
     return cmd;
 }