+2013-12-20 Mark Wielaard <mjw@redhat.com>
+
+ * linux-kernel-modules.c (report_kernel_archive): Correct nested
+ asprintf result check for debug.a.
+
2013-12-18 Mark Wielaard <mjw@redhat.com>
* derelocate.c (__libdwfl_find_section_ndx): New internal function.
/* Standard libdwfl callbacks for debugging the running Linux kernel.
- Copyright (C) 2005-2011 Red Hat, Inc.
+ Copyright (C) 2005-2011, 2013 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
return result;
char *archive;
- if (unlikely ((*release)[0] == '/'
- ? asprintf (&archive, "%s/debug.a", *release)
- : asprintf (&archive, MODULEDIRFMT "/debug.a", *release) < 0))
+ int res = (((*release)[0] == '/')
+ ? asprintf (&archive, "%s/debug.a", *release)
+ : asprintf (&archive, MODULEDIRFMT "/debug.a", *release));
+ if (unlikely (res < 0))
return ENOMEM;
int fd = try_kernel_name (dwfl, &archive, false);