perf record: Fix memory leak when using '--user-regs=?' to list registers
[linux-2.6-microblaze.git] / tools / perf / util / parse-regs-options.c
index e687497..a4a1004 100644 (file)
@@ -54,7 +54,7 @@ __parse_regs(const struct option *opt, const char *str, int unset, bool intr)
 #endif
                                fputc('\n', stderr);
                                /* just printing available regs */
-                               return -1;
+                               goto error;
                        }
 #ifdef HAVE_PERF_REGS_SUPPORT
                        for (r = sample_reg_masks; r->name; r++) {