diff options
author | Tom Tromey <tromey@redhat.com> | 2012-08-22 14:24:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-08-22 14:24:05 +0000 |
commit | 2f2e97fabcc53e4f842e076613b8987b53fe2e1e (patch) | |
tree | d2aa3b29338f1c0d2e8a52ed610f6b0aa93971c4 /gdb/cli/cli-cmds.c | |
parent | da2bb5602cf284df54e3e150fc9bb42dc659ec11 (diff) | |
download | gdb-2f2e97fabcc53e4f842e076613b8987b53fe2e1e.zip gdb-2f2e97fabcc53e4f842e076613b8987b53fe2e1e.tar.gz gdb-2f2e97fabcc53e4f842e076613b8987b53fe2e1e.tar.bz2 |
* cli/cli-cmds.c (filter_sals): Handle nelts == 0 case.
Diffstat (limited to 'gdb/cli/cli-cmds.c')
-rw-r--r-- | gdb/cli/cli-cmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 2a80803..5d8a124 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -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 |