grep: recurse in-process using 'struct repository'
[gitweb.git] / ll-merge.c
index b9576efe97b98d8b7971045b7be3698b9592c5e6..9fb855a90030e07e28c1ae9d0994006da22cd4ed 100644 (file)
@@ -210,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: