Use __attribute__(cleanup) in more code