summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/SERVICES/HIF/ath_procfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/CORE/SERVICES/HIF/ath_procfs.c b/CORE/SERVICES/HIF/ath_procfs.c
index 0dca014ab71b..41c68c55191d 100644
--- a/CORE/SERVICES/HIF/ath_procfs.c
+++ b/CORE/SERVICES/HIF/ath_procfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013, 2016-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -113,8 +113,10 @@ static ssize_t ath_procfs_diag_read(struct file *file, char __user *buf,
(A_UINT8 *)read_buffer, count);
}
- if (rv)
+ if (rv) {
+ vos_mem_free(read_buffer);
return -EIO;
+ }
if(copy_to_user(buf, read_buffer, count)) {
vos_mem_free(read_buffer);