CRM-13628 fix memory leak in note deletion by freeing DAO