diff options
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r-- | gdb/darwin-nat.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 88cecf3..23a921d 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1991,12 +1991,9 @@ set_enable_mach_exceptions (char *args, int from_tty, static char * darwin_pid_to_exec_file (struct target_ops *self, int pid) { - char *path; + static char path[PATH_MAX]; int res; - path = xmalloc (PATH_MAX); - make_cleanup (xfree, path); - res = proc_pidinfo (pid, PROC_PIDPATHINFO, 0, path, PATH_MAX); if (res >= 0) return path; |