From: Alan T. DeKok Date: Sat, 13 Nov 2021 18:30:14 +0000 (-0500) Subject: re-init the deleted pairs list on abort X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32ae561ff1e9c76e04e0798f468334eed4d832a0;p=thirdparty%2Ffreeradius-server.git re-init the deleted pairs list on abort because the pairs will be moved to their correct place by edit_undo() --- diff --git a/src/lib/util/edit.c b/src/lib/util/edit.c index 4afc8e3f9d4..175086a1ba7 100644 --- a/src/lib/util/edit.c +++ b/src/lib/util/edit.c @@ -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