]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/kallsyms.c
fix possible null ptr deref in kallsyms_lookup
[linux-2.6-omap-h63xx.git] / kernel / kallsyms.c
index f1bda23140b2a60d0be17fade305d3ec3afae431..fed54418626c10727662a79d0e505ee302e0bcbf 100644 (file)
@@ -257,7 +257,8 @@ const char *kallsyms_lookup(unsigned long addr,
                pos = get_symbol_pos(addr, symbolsize, offset);
                /* Grab name */
                kallsyms_expand_symbol(get_symbol_offset(pos), namebuf);
-               *modname = NULL;
+               if (modname)
+                       *modname = NULL;
                return namebuf;
        }