Skip to content

Commit

Permalink
dict-sql: Fix flushing
Browse files Browse the repository at this point in the history
Remove flushing from set, and add it to unset. Fixes
signal 11 crash caused by infinite recursion.
  • Loading branch information
cmouse committed Jan 16, 2017
1 parent ae2bad2 commit fb6734c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib-dict/dict-sql.c
Expand Up @@ -1064,11 +1064,6 @@ static void sql_dict_set_real(struct dict_transaction_context *_ctx,
return;
}

if (ctx->prev_inc_map != NULL)
sql_dict_prev_inc_flush(ctx);
if (ctx->prev_set_map != NULL)
sql_dict_prev_set_flush(ctx);

field.map = map;
field.value = value;

Expand Down Expand Up @@ -1103,6 +1098,8 @@ static void sql_dict_unset(struct dict_transaction_context *_ctx,

if (ctx->prev_inc_map != NULL)
sql_dict_prev_inc_flush(ctx);
if (ctx->prev_set_map != NULL)
sql_dict_prev_set_flush(ctx);

map = sql_dict_find_map(dict, key, &values);
if (map == NULL) {
Expand Down

0 comments on commit fb6734c

Please sign in to comment.