aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-02-02 17:20:00 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-02-02 17:20:00 -0300
commit49a2dd657728675b019f7d4a2028d5f47f33f9d7 (patch)
tree6826b21bc82829622cb19cf969cae1e9743f1093
parent46cec35ff0411e0f7da69ba661ed5d76820b0123 (diff)
downloadpahole-49a2dd657728675b019f7d4a2028d5f47f33f9d7.tar.gz
fprintf: Check if conf->conf_fprintf is not NULL in when resolving cacheline_size
There are tools that don't set conf_load->conf_fprintf, like codiff, so check for that in dwarves__resolve_cacheline_size(). Cc: Douglas Raillard <douglas.raillard@arm.com> Fixes: 772725a77d3323c6 ("dwarves_fprintf: Move cacheline_size into struct conf_fprintf") Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--dwarves_fprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwarves_fprintf.c b/dwarves_fprintf.c
index 5d4329b7..a98b9f20 100644
--- a/dwarves_fprintf.c
+++ b/dwarves_fprintf.c
@@ -2023,7 +2023,7 @@ void dwarves__resolve_cacheline_size(const struct conf_load *conf, uint16_t user
} else
size = user_cacheline_size;
- if (conf)
+ if (conf && conf->conf_fprintf)
conf->conf_fprintf->cacheline_size = size;
conf_fprintf__defaults.cacheline_size = size;