Merge branch 'ab/sha1dc'
[gitweb.git] / ll-merge.c
index d7eafb61a6831020149d0da607bb47b995192296..9fb855a90030e07e28c1ae9d0994006da22cd4ed 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "cache.h"
+#include "config.h"
 #include "attr.h"
 #include "xdiff-interface.h"
 #include "run-command.h"
@@ -209,8 +210,7 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
        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: