]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
propagate from branch 'com.redhat.elfutils' (head bef2134618ae8468c403066e350769ec46e...
authorRoland McGrath <roland@redhat.com>
Tue, 29 Apr 2008 01:49:50 +0000 (01:49 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 29 Apr 2008 01:49:50 +0000 (01:49 +0000)
            to branch 'com.redhat.elfutils.roland.pending' (head 0a8081a6b3306c7fc090f01691f4c561b841d4f0)

libdwfl/ChangeLog
libdwfl/linux-kernel-modules.c

index 734571ca3c5f2e5c2453d8dfaf3f7b484936c4d6..2b4d78d97959bcb3dbc4cf0e8a0c302587e37e6a 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-27  Roland McGrath  <roland@redhat.com>
+
+       * linux-kernel-modules.c (report_kernel): Fix crash when
+       dwfl_report_elf fails.
+
 2008-04-05  Roland McGrath  <roland@redhat.com>
 
        * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
index b113806e185135790cdd4c5dfbe3c35ae416cd83..d18657b2b47e39ad32e3aa9ce2917983ba90a682 100644 (file)
@@ -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)