aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:31:48 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:31:48 +0000
commit1fc3cf4a5ac1e3dddf9aee7832fcd2b958ea399f (patch)
treef08481c88353a9dde981bb39568de8ef0e3e38ac /gdb/linux-thread-db.c
parente35ac9bf5c3e411f6c41cceb4651402674797da0 (diff)
downloadgdb-1fc3cf4a5ac1e3dddf9aee7832fcd2b958ea399f.zip
gdb-1fc3cf4a5ac1e3dddf9aee7832fcd2b958ea399f.tar.gz
gdb-1fc3cf4a5ac1e3dddf9aee7832fcd2b958ea399f.tar.bz2
fix linux-thread-db.c
This is a stylistic change to make it so the checker can analyze a function in linux-thread-db.c. * linux-thread-db.c (thread_db_load_search): Unconditionally call do_cleanups.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index a698c65..23c29c9 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1029,17 +1029,17 @@ thread_db_load_search (void)
|| this_dir[pdir_len] == '/'))
{
char *subdir = NULL;
- struct cleanup *free_subdir_cleanup = NULL;
+ struct cleanup *free_subdir_cleanup
+ = make_cleanup (null_cleanup, NULL);
if (this_dir[pdir_len] == '/')
{
subdir = xmalloc (strlen (this_dir));
- free_subdir_cleanup = make_cleanup (xfree, subdir);
+ make_cleanup (xfree, subdir);
strcpy (subdir, this_dir + pdir_len + 1);
}
rc = try_thread_db_load_from_pdir (subdir);
- if (free_subdir_cleanup != NULL)
- do_cleanups (free_subdir_cleanup);
+ do_cleanups (free_subdir_cleanup);
if (rc)
break;
}