registrar: Fix memory leak around path and outbound header parsing

- Fix leak of parsed URI and URI parameters during a call to save()
(cherry picked from commit 56c880120c07443eceb732117f0f1aa3558dcfe5)