summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ctrl/control_if.c3
-rw-r--r--tests/ctrl/ctrl_test.c5
-rw-r--r--tests/ctrl/ctrl_test.ok2
3 files changed, 3 insertions, 7 deletions
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 7c1d81ac..5c73b631 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -387,7 +387,6 @@ int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, stru
cmd->ccon = ccon;
if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) {
ctrl_cmd_send(&ccon->write_queue, cmd);
- talloc_free(cmd);
}
} else {
cmd = talloc_zero(ccon, struct ctrl_cmd);
@@ -398,9 +397,9 @@ int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, stru
cmd->id = "err";
cmd->reply = "Command parser error.";
ctrl_cmd_send(&ccon->write_queue, cmd);
- talloc_free(cmd);
}
+ talloc_free(cmd);
return 0;
}
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index 9c7316fc..e25929c2 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -120,9 +120,8 @@ static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection *ccon,
if (talloc_total_size(ctx) != ctx_size_was) {
printf("mem leak!\n");
- // hide mem leak to be fixed in subsequent patch
- //talloc_report_full(ctx, stdout);
- //OSMO_ASSERT(false);
+ talloc_report_full(ctx, stdout);
+ OSMO_ASSERT(false);
}
printf("ok\n");
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