Browse Source

qcacld-3.0: Free allocated memory before return

Currently in function ol_copy_ramdump dynamically allocated memory
is not freed before return in error condition. In this change free
memory before return.

Change-Id: Ie75d69a1716c3598e0123064a6ee522076748f7d
CRs-Fixed: 2044460
Sravan Kumar Kairam 8 years ago
parent
commit
76ab2662f5
1 changed files with 1 additions and 0 deletions
  1. 1 0
      core/bmi/src/ol_fw.c

+ 1 - 0
core/bmi/src/ol_fw.c

@@ -504,6 +504,7 @@ int ol_copy_ramdump(struct hif_opaque_softc *scn)
 
 	if (!info->base || !info->size) {
 		BMI_ERR("%s:ramdump collection fail", __func__);
+		qdf_mem_free(info);
 		return -EACCES;
 	}