summaryrefslogtreecommitdiff
path: root/lib-src/ebrowse.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/ebrowse.c')
-rw-r--r--lib-src/ebrowse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 58e9c45945d..cdd3ccba2c5 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -2914,8 +2914,8 @@ parse_qualified_ident_or_type (last_id)
char **last_id;
{
struct sym *cls = NULL;
- static char *id = NULL;
- static int id_size = 0;
+ char *id = NULL;
+ size_t id_size = 0;
while (LOOKING_AT (IDENT))
{
@@ -2935,6 +2935,9 @@ parse_qualified_ident_or_type (last_id)
{
cls = add_sym (id, cls);
*last_id = NULL;
+ xfree (id);
+ id = NULL;
+ id_size = 0;
MATCH ();
}
else
@@ -3617,6 +3620,8 @@ read_line (fp)
}
buffer[i] = '\0';
+ if (i > 0 && buffer[i - 1] == '\r')
+ buffer[i - 1] = '\0';
return buffer;
}