diff --git a/stagit.c b/stagit.c
@@ -14,7 +14,7 @@
#include <unistd.h>
#include <git2.h>
-#include <src/cmark.h>
+#include "cmark.h"
#include "compat.h"
@@ -84,13 +84,12 @@ static const char *cachefile;
void write_markdown_readme(FILE *file, git_blob *readme)
{
- char *markdown = git_blob_rawcontent(readme);
+ const char *markdown = git_blob_rawcontent(readme);
char *html = cmark_markdown_to_html(markdown,
strlen(markdown), CMARK_OPT_SAFE);
fprintf(file, "%s", html);
free(html);
- free(markdown);
}
void joinpath(char *buf, size_t bufsiz, const char *path, const char *path2)