Found using --- @@ expression E; identifier i; identifier address; @@ - i = malloc(strlen(E) + 1); - strcpy(address, E); + i = strdup(E); ---
Signed-off-by: Matt Turner <[email protected]> --- hw/xfree86/parser/scan.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index 5312143..9f63570 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -1088,8 +1088,7 @@ void xf86setSection (char *section) { free(configSection); - configSection = malloc(strlen (section) + 1); - strcpy (configSection, section); + configSection = strdup(section); } /* -- 1.7.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
