From: Roland McGrath Date: Tue, 29 Apr 2008 01:49:50 +0000 (+0000) Subject: propagate from branch 'com.redhat.elfutils' (head bef2134618ae8468c403066e350769ec46e... X-Git-Tag: elfutils-0.135~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9897d66b4ec33c24719d0974b17db6fe9ea16c8e;p=thirdparty%2Felfutils.git propagate from branch 'com.redhat.elfutils' (head bef2134618ae8468c403066e350769ec46e303b7) to branch 'com.redhat.elfutils.roland.pending' (head 0a8081a6b3306c7fc090f01691f4c561b841d4f0) --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 734571ca3..2b4d78d97 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2008-04-27 Roland McGrath + + * linux-kernel-modules.c (report_kernel): Fix crash when + dwfl_report_elf fails. + 2008-04-05 Roland McGrath * 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 b113806e1..d18657b2b 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)