diff.c: emit_diff_symbol learns about DIFF_SYMBOL_SUMMARY
[gitweb.git] / builtin / cat-file.c
index 421709517c765d83fa4a4abf00ff3b8a9dd79f64..7efbc4019ac59a16ae4f147889e6f489dac1e661 100644 (file)
@@ -4,7 +4,9 @@
  * Copyright (C) Linus Torvalds, 2005
  */
 #include "cache.h"
+#include "config.h"
 #include "builtin.h"
+#include "diff.h"
 #include "parse-options.h"
 #include "userdiff.h"
 #include "streaming.h"
@@ -166,6 +168,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
                die("git cat-file %s: bad file", obj_name);
 
        write_or_die(1, buf, size);
+       free(buf);
        free(obj_context.path);
        return 0;
 }