Fixing memory leak introduced by b552200 (closes #3050)