* variable.c (create_pattern_var): [SV 51266] Create with xcalloc().

Reported by Chris Metcalf <cmetcalf@mellanox.com>
This commit is contained in:
Paul Smith 2017-07-09 18:56:36 -04:00
parent 78b5fec689
commit 22fd578693

View file

@ -51,7 +51,7 @@ struct pattern_var *
create_pattern_var (const char *target, const char *suffix)
{
register unsigned int len = strlen (target);
register struct pattern_var *p = xmalloc (sizeof (struct pattern_var));
register struct pattern_var *p = xcalloc (sizeof (struct pattern_var));
if (pattern_vars != 0)
{