From fba6d33793b0c7f3053f3c7df3b3eb6074c47a40 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 19 Mar 2013 13:12:32 +0100 Subject: [PATCH] Fix use of sizeof in nmem_malloc call Now sizeof(char*) , rather than sizeof(char). --- src/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index 25f6505..c4ab916 100644 --- a/src/client.c +++ b/src/client.c @@ -1703,7 +1703,7 @@ struct suggestions* client_suggestions_create(const char* suggestions_string) &suggestions->num, 1, '\\', 0); /* Set up misspelled array */ suggestions->misspelled = (char **) - nmem_malloc(nmem, suggestions->num * sizeof(**suggestions->misspelled)); + nmem_malloc(nmem, suggestions->num * sizeof(*suggestions->misspelled)); /* replace = with \0 .. for each item */ for (i = 0; i < suggestions->num; i++) { -- 1.7.10.4