summaryrefslogtreecommitdiff
path: root/gdb/cli/cli-cmds.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-22 14:23:58 +0000
committerTom Tromey <tromey@redhat.com>2012-08-22 14:23:58 +0000
commitce7c6a44dd3d384fa518ff76b62dd5af5d23ee6e (patch)
tree86f3392f1db39c3fa141c23965ac9fec3c4785f3 /gdb/cli/cli-cmds.c
parent4411ab11224f7afb3a808d05c8d88d4b79ed2f1b (diff)
downloadgdb-ce7c6a44dd3d384fa518ff76b62dd5af5d23ee6e.tar.gz
* 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 2a808034027..5d8a124ab26 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