]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strmap.c
builtin/for-each-repo: remove unnecessary argv copy to plug leak
[thirdparty/git.git] / strmap.c
index 4fb9f6100eccb7b4b3bcdd18d2801cc7b979807f..ee48635708219e66bf03bad6f5e9100c766d2fb7 100644 (file)
--- a/strmap.c
+++ b/strmap.c
@@ -25,7 +25,8 @@ static struct strmap_entry *find_strmap_entry(struct strmap *map,
 
 void strmap_init(struct strmap *map)
 {
-       strmap_init_with_options(map, NULL, 1);
+       struct strmap blank = STRMAP_INIT;
+       memcpy(map, &blank, sizeof(*map));
 }
 
 void strmap_init_with_options(struct strmap *map,