sdlog2: free buffer on exit