Commit 7d65864b authored by Tzvetomir Stoyanov (VMware)'s avatar Tzvetomir Stoyanov (VMware) Committed by Arnaldo Carvalho de Melo
Browse files

tools lib traceevent: Handle possible strdup() error in tep_add_plugin_path() API

parent db885ed4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;