summaryrefslogtreecommitdiffstats
path: root/tests/ctrl/ctrl_test.ok
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-16 04:05:21 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-18 23:05:50 +0000
commitf2c10f108202c350a3c16f49156b11b0cd0dfa96 (patch)
treee623921a0f0f9c5193e9208bbab38f18262a141e /tests/ctrl/ctrl_test.ok
parent6769ad6e0aca58ccc037746885976ea4f85cb318 (diff)
ctrl: fix mem leak when handling GET_REPLY and SET_REPLY
In ctrl_handle_msg() (code recently propagated from handle_control_read()), talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED. CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by ctrl_test.c. With the memleak fixed, adjust expected test output and make a detected mem leak abort the test immediately. Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381
Diffstat (limited to 'tests/ctrl/ctrl_test.ok')
-rw-r--r--tests/ctrl/ctrl_test.ok2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index 9ddcfdb1..210c5997 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -167,7 +167,6 @@ variable = 'variable'
value = '(null)'
reply = 'OK'
handling:
-mem leak!
ok
test: 'SET_REPLY 1 variable OK'
parsing:
@@ -176,5 +175,4 @@ variable = 'variable'
value = '(null)'
reply = 'OK'
handling:
-mem leak!
ok