Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8204:f643f8c0e29d HEAD
Don't use uninitialized variable for allocating initial array size.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 20 Sep 2008 19:30:07 +0300 |
parents | fb0691b3de71 |
children | b62042ddb79e |
files | src/lib-dict/dict-sql-settings.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);