projects
/
osmocom-bb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3abad6a
)
vty: Fix a memory leak in the vty description command
author
Holger Hans Peter Freyther
<zecke@selfish.org>
Thu, 24 Feb 2011 13:20:41 +0000
(14:20 +0100)
committer
Holger Hans Peter Freyther
<zecke@selfish.org>
Tue, 29 Mar 2011 11:24:21 +0000
(13:24 +0200)
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.
src/vty/logging_vty.c
patch
|
blob
|
history
diff --git
a/src/vty/logging_vty.c
b/src/vty/logging_vty.c
index
4cab22a
..
b037a5b
100644
(file)
--- a/
src/vty/logging_vty.c
+++ b/
src/vty/logging_vty.c
@@
-269,6
+269,8
@@
gDEFUN(cfg_description, cfg_description_cmd,
return CMD_WARNING;
}
+ if (*dptr)
+ talloc_free(*dptr);
*dptr = argv_concat(argv, argc, 0);
if (!dptr)
return CMD_WARNING;