Message ID | 20200714212320.928819723@goodmis.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | trace-cmd libtraceevent: Tzvetomir's updates from Namhyung's comments | expand |
diff --git a/lib/traceevent/event-plugin.c b/lib/traceevent/event-plugin.c index 841e41c68ad0..4a3f7d3f7969 100644 --- a/lib/traceevent/event-plugin.c +++ b/lib/traceevent/event-plugin.c @@ -666,6 +666,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;