Lines Matching refs:path
164 struct tracepoint_path *path = NULL; in tracepoint_id_to_path() local
201 path = zalloc(sizeof(*path)); in tracepoint_id_to_path()
202 path->system = malloc(MAX_EVENT_LENGTH); in tracepoint_id_to_path()
203 if (!path->system) { in tracepoint_id_to_path()
204 free(path); in tracepoint_id_to_path()
207 path->name = malloc(MAX_EVENT_LENGTH); in tracepoint_id_to_path()
208 if (!path->name) { in tracepoint_id_to_path()
209 zfree(&path->system); in tracepoint_id_to_path()
210 free(path); in tracepoint_id_to_path()
213 strncpy(path->system, sys_dirent.d_name, in tracepoint_id_to_path()
215 strncpy(path->name, evt_dirent.d_name, in tracepoint_id_to_path()
217 return path; in tracepoint_id_to_path()
229 struct tracepoint_path *path = zalloc(sizeof(*path)); in tracepoint_name_to_path() local
232 if (path == NULL || str == NULL) { in tracepoint_name_to_path()
233 free(path); in tracepoint_name_to_path()
237 path->system = strndup(name, str - name); in tracepoint_name_to_path()
238 path->name = strdup(str+1); in tracepoint_name_to_path()
240 if (path->system == NULL || path->name == NULL) { in tracepoint_name_to_path()
241 zfree(&path->system); in tracepoint_name_to_path()
242 zfree(&path->name); in tracepoint_name_to_path()
243 free(path); in tracepoint_name_to_path()
244 path = NULL; in tracepoint_name_to_path()
247 return path; in tracepoint_name_to_path()