src/sancara: Prevent memory leaks