]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - tools/perf/util/probe-event.c
Merge branch 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6.git] / tools / perf / util / probe-event.c
index fa156f008e0b61968a4d40c61e938dc6087841c8..c971e81e9cbf2e9276780a81fe7915bd478c29c2 100644 (file)
@@ -320,6 +320,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
        int ret;
 
        pp->probes[0] = buf = zalloc(MAX_CMDLEN);
+       pp->found = 1;
        if (!buf)
                die("Failed to allocate memory by zalloc.");
        if (pp->offset) {
@@ -342,6 +343,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
 error:
                free(pp->probes[0]);
                pp->probes[0] = NULL;
+               pp->found = 0;
        }
        return ret;
 }
@@ -507,6 +509,7 @@ void show_perf_probe_events(void)
 
        setup_pager();
 
+       memset(&pp, 0, sizeof(pp));
        fd = open_kprobe_events(O_RDONLY, 0);
        rawlist = get_trace_kprobe_event_rawlist(fd);
        close(fd);