Don't call strlen twice

Oops.
This commit is contained in:
Petri Lehtinen 2013-10-15 08:46:16 +03:00
parent d544852ff6
commit 08be94e8e6

View File

@ -256,7 +256,7 @@ int hashtable_set(hashtable_t *hashtable,
return -1;
}
pair = jsonp_malloc(offsetof(pair_t, key) + strlen(key) + 1);
pair = jsonp_malloc(offsetof(pair_t, key) + len + 1);
if(!pair)
return -1;