Fix off-by-one bug in create_argv().
authorAndre Noll <maan@systemlinux.org>
Sun, 29 Jul 2012 15:55:37 +0000 (17:55 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 27 Aug 2012 11:01:07 +0000 (13:01 +0200)
Nothing serious, just wasting memory.

string.c

index 7123ba1..a727f2a 100644 (file)
--- a/string.c
+++ b/string.c
@@ -831,7 +831,7 @@ void free_argv(char **argv)
  */
 int create_argv(const char *buf, const char *delim, char ***result)
 {
-       char *word, **argv = para_malloc(2 * sizeof(char *));
+       char *word, **argv = para_malloc(sizeof(char *));
        const char *p;
        int ret, num_words;