*/
#include "cache.h"
+#include "config.h"
#include "attr.h"
#include "xdiff-interface.h"
#include "run-command.h"
result->size = st.st_size;
result->ptr = xmallocz(result->size);
if (read_in_full(fd, result->ptr, result->size) != result->size) {
- free(result->ptr);
- result->ptr = NULL;
+ FREE_AND_NULL(result->ptr);
result->size = 0;
}
close_bad: