From: Mark Wielaard Date: Tue, 14 Apr 2009 17:54:38 +0000 (+0200) Subject: Only set sec in _stp_mod_sec_lookup when not NULL. X-Git-Tag: release-0.9.6~24^2~1^2~1 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4787e8398f4d0376f31cffc0771b71f5bbdd9d52;p=systemtap.git Only set sec in _stp_mod_sec_lookup when not NULL. * runtime/sym.c (_stp_mod_sec_lookup): Only set sec when not NULL. --- diff --git a/runtime/sym.c b/runtime/sym.c index a2cdd0ff1..fc9b2e806 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)