find_and_open_source can leak a cleanup.
* source.c (find_and_open_source): Call do_cleanups.
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
+ * source.c (find_and_open_source): Call do_cleanups.
+
2013-05-30 Tom Tromey <tromey@redhat.com>
* linux-thread-db.c (thread_db_load_search): Unconditionally
char *path = source_path;
const char *p;
int result;
+ struct cleanup *cleanup;
/* Quick way out if we already know its full name. */
*fullname = NULL;
}
+ cleanup = make_cleanup (null_cleanup, NULL);
+
if (dirname != NULL)
{
/* If necessary, rewrite the compilation directory name according
result = openp (path, OPF_SEARCH_IN_PATH, p, OPEN_MODE, fullname);
}
+ do_cleanups (cleanup);
return result;
}