samples cn_test: fix cn leakage
PATCH 1/1 samples cn_test: fix cn leakage
From: liboling <[email protected]>
Error return when add the second cn_test_id,
we need del the first cn_test_id.
Signed-off-by liboling <[email protected]>
--- samples/connector/cn_test.c | 1 + 1 file changed, 1 insertion(+)
samples/connector/cn_test.c +1 -0
@@ -151,6 +151,7 @@ static int cn_test_init(void) cn_test_id.val++; err =cn_add_callback (&cn_test_id, cn_test_name, cn_test_callback);if (err) { + cn_test_id.val--;cn_del_callback (&cn_test_id); goto err_out; }
Signature · 1 line
2.17.1