X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fnoerr%2Fnoerr.h;fp=ccan%2Fnoerr%2Fnoerr.h;h=bafb59bd021d5ff76d3f6c215afb837d8a2783a5;hp=99b0f69043ac458672597a7a3932a989528f491d;hb=1fe2fa08d37090fff67edd444dadacd11ff8eebf;hpb=09378088f7f49f30cb61435712a8dc2e52a32f69 diff --git a/ccan/noerr/noerr.h b/ccan/noerr/noerr.h index 99b0f690..bafb59bd 100644 --- a/ccan/noerr/noerr.h +++ b/ccan/noerr/noerr.h @@ -30,4 +30,12 @@ int fclose_noerr(FILE *fp); */ int unlink_noerr(const char *pathname); +/** + * free_noerr - free memory without stomping errno. + * @p: the pointer to free. + * + * errno is saved and restored across the call to free: the standard leaves + * that undefined. + */ +void free_noerr(void *p); #endif /* NOERR_H */