[sr-dev] git:master:3de5a781: snmpstats: use same type as the pointer for sizeof

Daniel-Constantin Mierla miconda at gmail.com
Mon May 2 07:59:13 CEST 2022


Module: kamailio
Branch: master
Commit: 3de5a781a3d0333352ab72c6b790f472f393df2b
URL: https://github.com/kamailio/kamailio/commit/3de5a781a3d0333352ab72c6b790f472f393df2b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-04-30T17:21:42+02:00

snmpstats: use same type as the pointer for sizeof

---

Modified: src/modules/snmpstats/snmpSIPContactTable.c

---

Diff:  https://github.com/kamailio/kamailio/commit/3de5a781a3d0333352ab72c6b790f472f393df2b.diff
Patch: https://github.com/kamailio/kamailio/commit/3de5a781a3d0333352ab72c6b790f472f393df2b.patch

---

diff --git a/src/modules/snmpstats/snmpSIPContactTable.c b/src/modules/snmpstats/snmpSIPContactTable.c
index d23f8557ac..e953bae6a3 100644
--- a/src/modules/snmpstats/snmpSIPContactTable.c
+++ b/src/modules/snmpstats/snmpSIPContactTable.c
@@ -203,7 +203,7 @@ int createContactRow(int userIndex, int contactIndex, char *contactName,
 
 	/* Fill in the rest of the rows columns */
 	theRow->kamailioSIPContactURI =
-			(unsigned char *)pkg_malloc((stringLength + 1) * sizeof(char));
+			(unsigned char *)pkg_malloc((stringLength + 1) * sizeof(unsigned char));
 	if(theRow->kamailioSIPContactURI == NULL) {
 		pkg_free(OIDIndex);
 		free(theRow);




More information about the sr-dev mailing list