Skip to content

Commit d546ee6

Browse files
Vanshika Shuklashemminger
authored andcommitted
net/dpaa: fix resource leak coverity issue
This patch correct the cleanup order of PCD and FMan handles to prevent resource leaks reported by coverity tool. Coverity issue: 362787 Fixes: 4defbc8 ("net/dpaa: support FMCless mode") Cc: [email protected] Cc: [email protected] Signed-off-by: Vanshika Shukla <[email protected]>
1 parent 8d7e377 commit d546ee6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/dpaa/dpaa_flow.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* SPDX-License-Identifier: BSD-3-Clause
2-
* Copyright 2017-2019,2021-2024 NXP
2+
* Copyright 2017-2019,2021-2025 NXP
33
*/
44

55
/* System headers */
@@ -889,9 +889,9 @@ int dpaa_fm_init(void)
889889
/* FM PCD Enable */
890890
ret = fm_pcd_enable(pcd_handle);
891891
if (ret) {
892-
fm_close(fman_handle);
893-
fm_pcd_close(pcd_handle);
894892
DPAA_PMD_ERR("fm_pcd_enable: Failed");
893+
fm_pcd_close(pcd_handle);
894+
fm_close(fman_handle);
895895
return -1;
896896
}
897897

0 commit comments

Comments
 (0)