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

George Joseph asteriskteam at digium.com
Tue Oct 6 09:08:02 CDT 2020


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15035 )

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(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



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: 2
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201006/7244f56c/attachment.html>


More information about the asterisk-code-review mailing list