Diff between ee91c14309a3c67c244d91fdc522f077f31decb5 and 0e73bb797f63a1d72cc528746af70339ced90d7d

Changed Files

File Additions Deletions Status
src/shared/hfp.c +2 -0 modified

Full Patch

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index eb6bf4e..22e9622 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -1098,6 +1098,8 @@ static void hf_process_input(struct hfp_hf *hfp)
 		*ptr = '\0';
 
 		tmp = malloc(len + count);
+		if (!tmp)
+			goto done;
 
 		/* "str" here is not a string so we need to use memcpy */
 		memcpy(tmp, str, len);