]> granicus.if.org Git - cgit/commitdiff
shared.c: initialize cgit_repo structs properly
authorLars Hjemli <hjemli@gmail.com>
Mon, 24 Aug 2009 08:14:02 +0000 (10:14 +0200)
committerLars Hjemli <hjemli@gmail.com>
Mon, 24 Aug 2009 08:22:59 +0000 (10:22 +0200)
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
shared.c

index 9475581b2c4a20d73b639223156b8a7afbd5b5ca..d7b2d5a9efe777acc8140ae9401b9c9d17a5fd79 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -48,6 +48,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
        }
 
        ret = &cgit_repolist.repos[cgit_repolist.count-1];
+       memset(ret, 0, sizeof(struct cgit_repo));
        ret->url = trim_end(url, '/');
        ret->name = ret->url;
        ret->path = NULL;