void-packages/srcpkgs/cgdb/patches/fix-memory-leak.patch
2018-12-30 21:04:01 +01:00

18 lines
829 B
Diff

--- 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"