]> git.ozlabs.org Git - ccan/blobdiff - ccan/noerr/noerr.h
noerr: add free_noerr().
[ccan] / ccan / noerr / noerr.h
index 99b0f69043ac458672597a7a3932a989528f491d..bafb59bd021d5ff76d3f6c215afb837d8a2783a5 100644 (file)
@@ -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 */