* cli/cli-cmds.c (filter_sals): Handle nelts == 0 case.

This commit is contained in:
Tom Tromey 2012-08-22 14:24:05 +00:00
parent da2bb5602c
commit 2f2e97fabc
2 changed files with 6 additions and 1 deletions

View file

@ -1534,13 +1534,14 @@ filter_sals (struct symtabs_and_lines *sals)
++out;
}
}
sals->nelts = out;
if (sals->nelts == 0)
{
xfree (sals->sals);
sals->sals = NULL;
}
else
sals->nelts = out;
}
static void