summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2008-04-29 01:49:50 +0000
committerRoland McGrath <[email protected]>2008-04-29 01:49:50 +0000
commit9897d66b4ec33c24719d0974b17db6fe9ea16c8e (patch)
treebc1b2da656989357c6518734b5d23898ddf77b97
parent521c47d2a216fc64098c024fc5ed53532b485f32 (diff)
propagate from branch 'com.redhat.elfutils' (head bef2134618ae8468c403066e350769ec46e303b7)
to branch 'com.redhat.elfutils.roland.pending' (head 0a8081a6b3306c7fc090f01691f4c561b841d4f0)
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/linux-kernel-modules.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 734571ca..2b4d78d9 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-27 Roland McGrath <[email protected]>
+
+ * linux-kernel-modules.c (report_kernel): Fix crash when
+ dwfl_report_elf fails.
+
2008-04-05 Roland McGrath <[email protected]>
* linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index b113806e..d18657b2 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -1,5 +1,5 @@
/* Standard libdwfl callbacks for debugging the running Linux kernel.
- Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
+ Copyright (C) 2005, 2006, 2007, 2008 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -192,9 +192,9 @@ report_kernel (Dwfl *dwfl, const char **release,
fname, fd, 0);
if (mod == NULL)
result = -1;
-
- /* The kernel is ET_EXEC, but always treat it as relocatable. */
- mod->e_type = ET_DYN;
+ else
+ /* The kernel is ET_EXEC, but always treat it as relocatable. */
+ mod->e_type = ET_DYN;
}
if (!report || result < 0)