aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/bugreport.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/bugreport.c')
-rw-r--r--builtin/bugreport.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index 96052541cb..52955e1d38 100644
--- a/builtin/bugreport.c
+++ b/builtin/bugreport.c
@@ -1,4 +1,6 @@
#include "builtin.h"
+#include "abspath.h"
+#include "gettext.h"
#include "parse-options.h"
#include "strbuf.h"
#include "help.h"
@@ -6,7 +8,8 @@
#include "hook.h"
#include "hook-list.h"
#include "diagnose.h"
-
+#include "setup.h"
+#include "wrapper.h"
static void get_system_info(struct strbuf *sys_info)
{
@@ -106,6 +109,7 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix)
const char *user_relative_path = NULL;
char *prefixed_filename;
size_t output_path_len;
+ int ret;
const struct option bugreport_options[] = {
OPT_CALLBACK_F(0, "diagnose", &diagnose, N_("mode"),
@@ -182,7 +186,9 @@ int cmd_bugreport(int argc, const char **argv, const char *prefix)
user_relative_path);
free(prefixed_filename);
- UNLEAK(buffer);
- UNLEAK(report_path);
- return !!launch_editor(report_path.buf, NULL, NULL);
+ strbuf_release(&buffer);
+
+ ret = !!launch_editor(report_path.buf, NULL, NULL);
+ strbuf_release(&report_path);
+ return ret;
}