Browse Source

Fix memory corruption (#15724)

Delay free
Stelios Fragkakis 1 year ago
parent
commit
a833f6674f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      database/contexts/api_v2.c

+ 2 - 1
database/contexts/api_v2.c

@@ -1114,8 +1114,9 @@ static bool contexts_conflict_callback(const DICTIONARY_ITEM *item __maybe_unuse
         }
         else {
             // merge
-            string_freez(o->family);
+            STRING *old_family = o->family;
             o->family = string_2way_merge(o->family, n->family);
+            string_freez(old_family);
         }
     }