diff options
| -rw-r--r-- | libdwfl/ChangeLog | 5 | ||||
| -rw-r--r-- | libdwfl/linux-kernel-modules.c | 8 |
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) |
