Fix uninitialized variable in error case.
authorRoland McGrath <roland@redhat.com>
Mon, 15 Feb 2010 23:16:44 +0000 (15:16 -0800)
committerRoland McGrath <roland@redhat.com>
Mon, 15 Feb 2010 23:16:44 +0000 (15:16 -0800)
libdwfl/ChangeLog
libdwfl/find-debuginfo.c

index db8b966..f6d3eaf 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-15  Roland McGrath  <roland@redhat.com>
+
+       * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
+       variable in failure path.
+
 2010-02-02  Mark Wielaard  <mjw@redhat.com>
 
        * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
index 9e81739..8fdaeb3 100644 (file)
@@ -1,5 +1,5 @@
 /* Standard find_debuginfo callback for libdwfl.
-   Copyright (C) 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
+   Copyright (C) 2005-2010 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -198,7 +198,7 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name,
          break;
        }
 
-      char *fname;
+      char *fname = NULL;
       int fd = try_open (dir, subdir, debuglink_file, &fname);
       if (fd < 0)
        switch (errno)