summaryrefslogtreecommitdiffstats
path: root/runtime/sym.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-14 19:54:38 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-14 19:54:38 +0200
commit4787e8398f4d0376f31cffc0771b71f5bbdd9d52 (patch)
tree9ee188ed6dbf35e5315af259851d60e076b38cf9 /runtime/sym.c
parent60ad8ebae62f472a9f089f51053a2d0d66c67a95 (diff)
downloadsystemtap-steved-4787e8398f4d0376f31cffc0771b71f5bbdd9d52.tar.gz
systemtap-steved-4787e8398f4d0376f31cffc0771b71f5bbdd9d52.tar.xz
systemtap-steved-4787e8398f4d0376f31cffc0771b71f5bbdd9d52.zip
Only set sec in _stp_mod_sec_lookup when not NULL.
* runtime/sym.c (_stp_mod_sec_lookup): Only set sec when not NULL.
Diffstat (limited to 'runtime/sym.c')
-rw-r--r--runtime/sym.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index a2cdd0ff..fc9b2e80 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -150,7 +150,8 @@ static struct _stp_module *_stp_mod_sec_lookup(unsigned long addr,
if (user != NULL)
{
m = (struct _stp_module *)user;
- *sec = &m->sections[0]; // XXX check actual section and relocate
+ if (sec)
+ *sec = &m->sections[0]; // XXX check actual section and relocate
dbug_sym(1, "found section %s in module %s at 0x%lx\n",
m->sections[0].name, m->name, vm_start);
if (strcmp(".dynamic", m->sections[0].name) == 0)