Code

use xmalloc in git.c and help.c
[git.git] / help.c
diff --git a/help.c b/help.c
index 0893fea0254f4ec8acbce82a0af41e4e61bd72a6..be8651a73977f860a87fb944f6fca52af41a2c28 100644 (file)
--- a/help.c
+++ b/help.c
@@ -58,7 +58,7 @@ static void add_cmdname(const char *name, int len)
                if (!cmdname)
                        oom();
        }
-       ent = malloc(sizeof(*ent) + len);
+       ent = xmalloc(sizeof(*ent) + len);
        if (!ent)
                oom();
        ent->len = len;