commit | ff0670edf399882329daa242247523d5f250f9a5 | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <zecke@selfish.org> | Thu Feb 24 14:20:41 2011 +0100 |
committer | Holger Hans Peter Freyther <zecke@selfish.org> | Tue Mar 29 13:24:21 2011 +0200 |
tree | 2dd0de155a4b297485532126172a7d478add819c | |
parent | 3abad6a6f9ae4cfa65c9f6d5f15208790449eefe [diff] [blame] |
vty: Fix a memory leak in the vty description command Before assigning a new string, free the previous one. This assume that it was allocated with talloc which should be true for the osmocom users.
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 4cab22a..b037a5b 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c
@@ -269,6 +269,8 @@ return CMD_WARNING; } + if (*dptr) + talloc_free(*dptr); *dptr = argv_concat(argv, argc, 0); if (!dptr) return CMD_WARNING;