|
@@ -2817,8 +2817,11 @@ int machine__load_vmlinux_path(struct machine *machine, enum map_type type,
|
|
|
|
|
|
struct map *dso__new_map(const char *name)
|
|
|
{
|
|
|
+ struct map *map = NULL;
|
|
|
struct dso *dso = dso__new(name);
|
|
|
- struct map *map = map__new2(0, dso, MAP__FUNCTION);
|
|
|
+
|
|
|
+ if (dso)
|
|
|
+ map = map__new2(0, dso, MAP__FUNCTION);
|
|
|
|
|
|
return map;
|
|
|
}
|