Re: free and errno, was Re: [PATCH] apply: replace mksnpath() with a mkpathdup() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ;-)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux