Merge branch 'tb/push-to-cygwin-unc-path'
[gitweb.git] / line-log.c
index 2588ce076749ecbb6bfbe591666430edf4ff9073..ab0709f9aecaacdfaf44aa31c88873b4ab5d8278 100644 (file)
@@ -34,9 +34,8 @@ void range_set_init(struct range_set *rs, size_t prealloc)
 
 void range_set_release(struct range_set *rs)
 {
-       free(rs->ranges);
+       FREE_AND_NULL(rs->ranges);
        rs->alloc = rs->nr = 0;
-       rs->ranges = NULL;
 }
 
 /* dst must be uninitialized! */
@@ -610,8 +609,7 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)
                line_log_data_insert(&ranges, full_name, begin, end);
 
                free_filespec(spec);
-               free(ends);
-               ends = NULL;
+               FREE_AND_NULL(ends);
        }
 
        for (p = ranges; p; p = p->next)