From: Alan T. DeKok Date: Fri, 12 Nov 2021 21:19:28 +0000 (-0500) Subject: don't free VP, pair_delete() does that X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25de6080b90366db6ff1d1c4b18101739cb2e922;p=thirdparty%2Ffreeradius-server.git don't free VP, pair_delete() does that --- diff --git a/src/lib/util/edit.c b/src/lib/util/edit.c index d226ba58c1f..7a89917130f 100644 --- a/src/lib/util/edit.c +++ b/src/lib/util/edit.c @@ -113,7 +113,6 @@ static int edit_undo(fr_edit_t *e) * must come after this VP was created. */ fr_pair_delete(e->list, vp); - talloc_free(vp); break; } @@ -141,6 +140,11 @@ void fr_edit_list_abort(fr_edit_list_t *el) */ while ((e = fr_dlist_pop_tail(&el->list)) != NULL) { edit_undo(e); + /* + * Don't free "e", it will be cleaned up when we + * talloc_free(el). That should be somewhat + * faster than doing it incrementally. + */ }; }