Skip to content
Commit 0a515a06 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Arnaldo Carvalho de Melo
Browse files

perf expr: Fix missing check for return value of hashmap__new()



The hashmap__new() function may return ERR_PTR(-ENOMEM) when malloc()
fails, add IS_ERR() checking for ctx->ids.

Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20211212062504.25841-1-linmq006@gmail.com


[ s/kfree()/free()/ and add missing linux/err.h include ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9eaa88c7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment