Browse code

Merge pull request #2960 from apogrebennyk/apogrebennyk/db_redis_update

db_redis: don't leave unconsumed redis replies in case of error

Andreas Granig authored on 30/11/2021 10:03:07 • GitHub committed on 30/11/2021 10:03:07
Showing 1 changed files
... ...
@@ -2249,6 +2249,7 @@ static int db_redis_perform_update(const db1_con_t* _h, km_redis_con_t *con, con
2249 2249
 
2250 2250
     db_redis_key_free(&all_type_keys);
2251 2251
     db_redis_key_free(&new_type_keys);
2252
+    db_redis_consume_replies(con);
2252 2253
     return 0;
2253 2254
 
2254 2255
 error:
... ...
@@ -2260,6 +2261,7 @@ error:
2260 2261
     db_redis_key_free(&type_keys);
2261 2262
     db_redis_key_free(&set_keys);
2262 2263
     db_redis_key_free(&new_type_keys);
2264
+    db_redis_consume_replies(con);
2263 2265
     return -1;
2264 2266
 }
2265 2267