This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[OBVIOUS] ARI fix: Use xstrdup instead of strdup
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 31 Mar 2010 16:45:46 +0200
- Subject: [OBVIOUS] ARI fix: Use xstrdup instead of strdup
A recent patch to remote.c
reintroduced a ARI rule critical warning.
http://sourceware.org/ml/gdb-cvs/2010-01/msg00106.html
strdup should not be used directly,
use xstrdup instead.
Checked in as obvious.
Pierre Muller
acting as ARI maintainer.
I was rethinking about this idea of sending new regressions
to gdb-patches list.
http://sourceware.org/ml/gdb-patches/2009-10/msg00164.html
Joel agreed in a reply to it that we could give it a try...
Should I set it up to direct new entries to the mailing list?
2010-03-31 Pierre Muller <muller@ics.u-strasbg.fr>
* src/gdb/remote.c (end_thread): Use xstrdup instead of strdup.
Index: src/gdb/remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.396
diff -u -p -r1.396 remote.c
--- src/gdb/remote.c 30 Mar 2010 15:45:13 -0000 1.396
+++ src/gdb/remote.c 31 Mar 2010 14:22:50 -0000
@@ -2450,7 +2450,7 @@ end_thread (struct gdb_xml_parser *parse
struct threads_parsing_context *data = user_data;
if (body_text && *body_text)
- VEC_last (thread_item_t, data->items)->extra = strdup (body_text);
+ VEC_last (thread_item_t, data->items)->extra = xstrdup (body_text);
}
const struct gdb_xml_attribute thread_attributes[] = {