Fix a small memleak in delv

(cherry picked from commit d00b3f47)
20 jobs for 712-memleak-in-delv-v9_12 in 15 minutes and 51 seconds (queued for 3 seconds)