X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-for-each-ref.c;h=af72a12a5798265cece6c7b72582fd3672421394;hb=43853554542700e0d129ce853a3d4b16740035d4;hp=173bf38735315a1c299f1f2e3db76a7795a2305c;hpb=3175aa1ec28c8fb119058111a2f629425ef1aab0;p=git.git diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c index 173bf3873..af72a12a5 100644 --- a/builtin-for-each-ref.c +++ b/builtin-for-each-ref.c @@ -6,7 +6,6 @@ #include "tree.h" #include "blob.h" #include "quote.h" -#include /* Quoting styles */ #define QUOTE_NONE 0 @@ -478,9 +477,9 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct obj if (!strcmp(name, "subject")) v->s = copy_line(subpos); else if (!strcmp(name, "body")) - v->s = bodypos; + v->s = xstrdup(bodypos); else if (!strcmp(name, "contents")) - v->s = subpos; + v->s = xstrdup(subpos); } }