aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/expr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-20 10:00:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-20 10:00:30 +0100
commit35eaa42c4a1017c08d0572008db375becb621744 (patch)
tree8185b6d18acfc63285e3132c9039c7d6c9a90527 /tools/perf/util/expr.c
parentserial: 8250_pci: remove redundant assignment to tmp after the mask operation (diff)
parentLinux 5.16-rc6 (diff)
downloadwireguard-linux-35eaa42c4a1017c08d0572008db375becb621744.tar.xz
wireguard-linux-35eaa42c4a1017c08d0572008db375becb621744.zip
Merge 5.16-rc6 into tty-next
We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util/expr.c')
-rw-r--r--tools/perf/util/expr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c
index 1d532b9fed29..254601060b39 100644
--- a/tools/perf/util/expr.c
+++ b/tools/perf/util/expr.c
@@ -12,6 +12,7 @@
#include "expr-bison.h"
#include "expr-flex.h"
#include "smt.h"
+#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/zalloc.h>
#include <ctype.h>
@@ -299,6 +300,10 @@ struct expr_parse_ctx *expr__ctx_new(void)
return NULL;
ctx->ids = hashmap__new(key_hash, key_equal, NULL);
+ if (IS_ERR(ctx->ids)) {
+ free(ctx);
+ return NULL;
+ }
ctx->runtime = 0;
return ctx;