]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
re-init the deleted pairs list on abort
authorAlan T. DeKok <aland@freeradius.org>
Sat, 13 Nov 2021 18:30:14 +0000 (13:30 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 13 Nov 2021 20:26:18 +0000 (15:26 -0500)
because the pairs will be moved to their correct place by
edit_undo()

src/lib/util/edit.c

index 4afc8e3f9d4a527842d9c8c9c643f2b4daaa9703..175086a1ba73fed63068f67e9d6b52dfb0a72915 100644 (file)
@@ -143,6 +143,13 @@ void fr_edit_list_abort(fr_edit_list_t *el)
 
        if (!el) return;
 
+       /*
+        *      All of these pairs are already in the edit list.  They
+        *      have the correct parent, and will be placed back into
+        *      their correct location by edit_undo()
+        */
+       fr_pair_list_init(&el->deleted_pairs);
+
        /*
         *      Undo edits in reverse order, as later edits depend on
         *      earlier ones.  We don't have multiple edits of the