Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libexecinfo print an error if we failed to allocate.
details: https://anonhg.NetBSD.org/src/rev/eede4bf10b1a
branches: trunk
changeset: 789692:eede4bf10b1a
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 03 08:44:45 2013 +0000
description:
print an error if we failed to allocate.
diffstat:
lib/libexecinfo/symtab.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 4883d59ed540 -r eede4bf10b1a lib/libexecinfo/symtab.c
--- a/lib/libexecinfo/symtab.c Tue Sep 03 06:12:00 2013 +0000
+++ b/lib/libexecinfo/symtab.c Tue Sep 03 08:44:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $ */
+/* $NetBSD: symtab.c,v 1.3 2013/09/03 08:44:45 christos Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $");
+__RCSID("$NetBSD: symtab.c,v 1.3 2013/09/03 08:44:45 christos Exp $");
#include <stdlib.h>
#include <stdio.h>
@@ -139,8 +139,10 @@
s->st_info = sym.st_info;
s->st_name = strdup(
elf_strptr(elf, shdr.sh_link, sym.st_name));
- if (s->st_name == NULL)
+ if (s->st_name == NULL) {
+ warn("Cannot allocate symbol");
goto out;
+ }
s++;
}
st->nsymbols = s - st->symbols;
Home |
Main Index |
Thread Index |
Old Index