filter-branch: Fix renaming a directory in the tree-filter
[gitweb.git] / xdiff-interface.c
index d8ba7e725fd30f2dde51a2b45ed0b6c9292bfce0..61dc5c547019776b971dc89d009f628bbac134fd 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;
        }
 }