Skip to content

Commit

Permalink
sql_cacher: fix SQL result leak when insert_in_cachedb fails
Browse files Browse the repository at this point in the history
  • Loading branch information
benceszigeti committed Jan 23, 2024
1 parent 10b6396 commit e8ece98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/sql_cacher/sql_cacher.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,9 @@ static int load_entire_table(cache_entry_t *c_entry, db_handlers_t *db_hdls,
if (!VAL_NULL(values)) {
if (insert_in_cachedb(c_entry, db_hdls, values ,values + 1,
reload_vers, ROW_N(row) - 1) < 0) {

lock_stop_write(db_hdls->c_entry->ref_lock);
return -1;
goto error;
}
loaded_rec++;
}
Expand Down

0 comments on commit e8ece98

Please sign in to comment.