Merge branch 'mp/for-each-ref-missing-name-or-email'
[gitweb.git] / ref-filter.c
index f27cfc8c3e358fa27d7aec78c0b3c44c816402b3..7338cfc67158ede687ba2c410ca6de29e414f5c4 100644 (file)
@@ -1028,7 +1028,7 @@ static const char *copy_name(const char *buf)
                if (!strncmp(cp, " <", 2))
                        return xmemdupz(buf, cp - buf);
        }
-       return "";
+       return xstrdup("");
 }
 
 static const char *copy_email(const char *buf)
@@ -1036,10 +1036,10 @@ static const char *copy_email(const char *buf)
        const char *email = strchr(buf, '<');
        const char *eoemail;
        if (!email)
-               return "";
+               return xstrdup("");
        eoemail = strchr(email, '>');
        if (!eoemail)
-               return "";
+               return xstrdup("");
        return xmemdupz(email, eoemail + 1 - email);
 }