diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /tools/perf/util/jitdump.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'tools/perf/util/jitdump.c')
| -rw-r--r-- | tools/perf/util/jitdump.c | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c index 0e033278fa12..28e49502db5e 100644 --- a/tools/perf/util/jitdump.c +++ b/tools/perf/util/jitdump.c @@ -235,9 +235,11 @@ jit_open(struct jit_buf_desc *jd, const char *name)  	 */  	strcpy(jd->dir, name);  	dirname(jd->dir); +	free(buf);  	return 0;  error: +	free(buf);  	funlockfile(jd->in);  	fclose(jd->in);  	return retval; @@ -523,7 +525,7 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)  	ret = perf_event__process_mmap2(tool, event, &sample, jd->machine);  	if (ret) -		return ret; +		goto out;  	ret = jit_inject_event(jd, event);  	/* @@ -532,6 +534,8 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)  	if (!ret)  		build_id__mark_dso_hit(tool, event, &sample, NULL, jd->machine); +out: +	free(event);  	return ret;  } @@ -874,6 +878,7 @@ jit_process(struct perf_session *session,  	}  	nsinfo__put(jd.nsi); +	free(jd.buf);  	return ret;  }  |