[Asterisk-code-review] res_stir_shaken: Fix memory allocation error in curl.c (asterisk[16])

Joshua Colp asteriskteam at digium.com
Thu Oct 1 05:30:51 CDT 2020


Hello Benjamin Keith Ford,

I'd like you to do a code review. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/15035

to review the following change.


Change subject: res_stir_shaken: Fix memory allocation error in curl.c
......................................................................

res_stir_shaken: Fix memory allocation error in curl.c

Fixed a memory allocation that was not passing in the correct size for
the struct in curl.c.

Change-Id: I5fb92fbbe84b075fa6aefa2423786df80e114c3a
---
M res/res_stir_shaken/curl.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/15035/1

diff --git a/res/res_stir_shaken/curl.c b/res/res_stir_shaken/curl.c
index 634c2bf..ab29e3d 100644
--- a/res/res_stir_shaken/curl.c
+++ b/res/res_stir_shaken/curl.c
@@ -41,7 +41,7 @@
 {
 	struct curl_cb_data *data;
 
-	data = ast_calloc(1, sizeof(data));
+	data = ast_calloc(1, sizeof(*data));
 
 	return data;
 }

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15035
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I5fb92fbbe84b075fa6aefa2423786df80e114c3a
Gerrit-Change-Number: 15035
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201001/b10864af/attachment-0001.html>


More information about the asterisk-code-review mailing list