From d973bd3cc51180a31f48392ea747bf8e6ccc5f42 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Sun, 30 Dec 2018 13:21:34 -0600 Subject: [PATCH] cgdb: Add patch to fix memory leak --- srcpkgs/cgdb/patches/fix-memory-leak.patch | 18 ++++++++++++++++++ srcpkgs/cgdb/template | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/cgdb/patches/fix-memory-leak.patch diff --git a/srcpkgs/cgdb/patches/fix-memory-leak.patch b/srcpkgs/cgdb/patches/fix-memory-leak.patch new file mode 100644 index 00000000000..77a3be08922 --- /dev/null +++ b/srcpkgs/cgdb/patches/fix-memory-leak.patch @@ -0,0 +1,18 @@ +--- lib/tgdb/tgdb.cpp.orig 2018-12-30 13:23:23.260656690 -0600 ++++ lib/tgdb/tgdb.cpp 2018-12-30 13:24:33.484655276 -0600 +@@ -1039,11 +1039,14 @@ + request->choice.debugger_command.c); + break; + case TGDB_REQUEST_MODIFY_BREAKPOINT: +- command = tgdb_client_modify_breakpoint_call(tgdb, ++ str = tgdb_client_modify_breakpoint_call(tgdb, + request->choice.modify_breakpoint.file, + request->choice.modify_breakpoint.line, + request->choice.modify_breakpoint.addr, + request->choice.modify_breakpoint.b); ++ command = str; ++ free(str); ++ str = NULL; + break; + case TGDB_REQUEST_COMPLETE: + str = sys_aprintf("server interpreter-exec mi" diff --git a/srcpkgs/cgdb/template b/srcpkgs/cgdb/template index 7f4a3334110..c9831c11564 100644 --- a/srcpkgs/cgdb/template +++ b/srcpkgs/cgdb/template @@ -1,7 +1,7 @@ # Template file for 'cgdb' pkgname=cgdb version=0.7.0 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-installed-readline=${XBPS_CROSS_BASE}/usr ac_cv_rl_version=6.3" hostmakedepends="flex help2man"