Jeff King <peff@xxxxxxxx> writes: >> + free(newpath); >> if (errno != EEXIST) >> break; >> ++nr; > > At any rate, you can probably see the places where free() clobbering > errno would be a problem here. Our return when "res < 0" (though I don't > think any of the callers actually care about errno after that), the > check for EEXIST at the bottom of the loop, and after we break out of > the loop, we use error_errno() to report it. Yeah, a failing free() is unlikely to set errno to EEXIST ;-)