Message ID | 20200722011755.720803193@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 7d65864b3b4fcc106d147f8a03bce7f8354f8984 |
Headers | show |
Series | tools lib traceevent: Synchronizing trace-cmd with tools | expand |
diff --git a/tools/lib/traceevent/event-plugin.c b/tools/lib/traceevent/event-plugin.c index f0877a7e3e8d..e7c2acb8680f 100644 --- a/tools/lib/traceevent/event-plugin.c +++ b/tools/lib/traceevent/event-plugin.c @@ -665,6 +665,10 @@ int tep_add_plugin_path(struct tep_handle *tep, char *path, return -1; dir->path = strdup(path); + if (!dir->path) { + free(dir); + return -1; + } dir->prio = prio; dir->next = tep->plugins_dir; tep->plugins_dir = dir;