瀏覽代碼

qcacmn: Add missing qdf_mem_free in CFR pdev obj create function

Add missing qdf_mem_free in wlan_cfr_pdev_obj_create_handler().

Change-Id: I2f5528a95ec8429ab0a5853db4a0f34a6425903c
CRs-Fixed: 2887089
Shashikala Prabhu 4 年之前
父節點
當前提交
c45259af49
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      umac/cfr/core/src/cfr_common.c

+ 2 - 1
umac/cfr/core/src/cfr_common.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -169,6 +169,7 @@ wlan_cfr_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev, void *arg)
 	pa->lut_num = wlan_cfr_get_dbr_num_entries(pdev);
 	if (!pa->lut_num) {
 		cfr_err("lut num is 0");
+		qdf_mem_free(pa);
 		return QDF_STATUS_E_INVAL;
 	}
 	pa->lut = (struct look_up_table **)qdf_mem_malloc(pa->lut_num *