Closed eriksjolund closed 5 months ago
I added another small errno modification and rewrote the commit message.
At least systemd has a handy PRESERVE_ERRNO
macro that I've used in other places too, and I think is a nicer approach. We could add that here.
According to errno(3) a function that succeeds is allowed to change errno. What if memdup() succeeds?
I changed the code to match how it's written here https://github.com/containers/composefs/blob/d5ffbeb6844cdbe029f9c10cfa98239e2d6b1570/libcomposefs/lcfs-writer.c#L1472