From: Adam Dickmeiss Date: Tue, 19 Mar 2013 12:12:32 +0000 (+0100) Subject: Fix use of sizeof in nmem_malloc call X-Git-Tag: v1.6.28~3 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=fba6d33793b0c7f3053f3c7df3b3eb6074c47a40;p=pazpar2-moved-to-github.git Fix use of sizeof in nmem_malloc call Now sizeof(char*) , rather than sizeof(char). --- 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++) {