commit: drop useless xstrdup of commit message
[gitweb.git] / builtin / commit.c
index 38b9a9cc0d0e1beba3258f907e95ae1ad76f85f5..fbbb40fff93f652fbe23730272fb88a6dbda29b6 100644 (file)
@@ -962,7 +962,7 @@ static const char *read_commit_message(const char *name)
         * encodings are identical.
         */
        if (out == NULL)
-               out = xstrdup(commit->buffer);
+               out = commit->buffer;
        return out;
 }