summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--parsing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing.c b/parsing.c
index 8aad1dd..1013dad 100644
--- a/parsing.c
+++ b/parsing.c
@@ -220,7 +220,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
220 220
221 p = data; 221 p = data;
222 222
223 while (p) { 223 while (p && *p) {
224 if (*p == '\n') 224 if (*p == '\n')
225 break; 225 break;
226 226
@@ -238,7 +238,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
238 238
239 while (p && (*p == '\n')) 239 while (p && (*p == '\n'))
240 p = strchr(p, '\n') + 1; 240 p = strchr(p, '\n') + 1;
241 if (p) 241 if (p && *p)
242 ret->msg = xstrdup(p); 242 ret->msg = xstrdup(p);
243 free(data); 243 free(data);
244 return ret; 244 return ret;