# HG changeset patch # User Timo Sirainen # Date 1221928207 -10800 # Node ID f643f8c0e29dfb972764635b721c5d474d696455 # Parent fb0691b3de71e056542ccdef4ec5d61d1e084e7c Don't use uninitialized variable for allocating initial array size. diff -r fb0691b3de71 -r f643f8c0e29d src/lib-dict/dict-sql-settings.c --- a/src/lib-dict/dict-sql-settings.c Sat Sep 20 19:28:18 2008 +0300 +++ b/src/lib-dict/dict-sql-settings.c Sat Sep 20 19:30:07 2008 +0300 @@ -72,12 +72,12 @@ const char *p, *name; unsigned int i, count; - p_array_init(&ctx->cur_map.sql_fields, ctx->pool, count); - /* go through the variables in the pattern, replace them with plain '$' character and add its sql field */ pattern = t_str_new(strlen(ctx->cur_map.pattern) + 1); fields = array_get_modifiable(&ctx->cur_fields, &count); + + p_array_init(&ctx->cur_map.sql_fields, ctx->pool, count); for (p = ctx->cur_map.pattern; *p != '\0';) { if (*p != '$') { str_append_c(pattern, *p);