git-p4: Unset P4DIFF environment variable when using 'p4 -du diff'
[gitweb.git] / xdiff-interface.c
index 4b8e5cca804198b0e227454a585fa025281bbe2d..bba236428adb0b34421b9f1b5a3a1728911ee406 100644 (file)
@@ -233,8 +233,7 @@ void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value)
                        expression = value;
                if (regcomp(&reg->re, expression, 0))
                        die("Invalid regexp to look for hunk header: %s", expression);
-               if (buffer)
-                       free(buffer);
+               free(buffer);
                value = ep + 1;
        }
 }