Merge branch 'ab/grep-lose-opt-regflags'
[gitweb.git] / diffcore-rename.c
index 03d1e8d40bb78d03c6b7257b05275de739693671..1e4678b7d7cb56ee52f160b55924ddeb863e2872 100644 (file)
@@ -667,11 +667,9 @@ void diffcore_rename(struct diff_options *options)
        for (i = 0; i < rename_dst_nr; i++)
                free_filespec(rename_dst[i].two);
 
-       free(rename_dst);
-       rename_dst = NULL;
+       FREE_AND_NULL(rename_dst);
        rename_dst_nr = rename_dst_alloc = 0;
-       free(rename_src);
-       rename_src = NULL;
+       FREE_AND_NULL(rename_src);
        rename_src_nr = rename_src_alloc = 0;
        return;
 }