diff --git a/sys/net/ccn_lite/ccnl-ext-appserver.c b/sys/net/ccn_lite/ccnl-ext-appserver.c index 73ac2f75af..9afc7356fa 100644 --- a/sys/net/ccn_lite/ccnl-ext-appserver.c +++ b/sys/net/ccn_lite/ccnl-ext-appserver.c @@ -95,7 +95,7 @@ static int appserver_handle_interest(char *data, uint16_t datalen, uint16_t from char name[] = "/riot/appserver/test/0"; appserver_create_prefix(name, prefix); - unsigned char *content_pkg = malloc(PAYLOAD_SIZE); + unsigned char *content_pkg = ccnl_malloc(PAYLOAD_SIZE); if (!content_pkg) { puts("appserver_handle_interest: malloc failed"); return 0; @@ -154,7 +154,7 @@ static void riot_ccnl_appserver_register(void) snprintf(faceid, sizeof(faceid), "%" PRIkernel_pid, thread_getpid()); char *type = "newMSGface"; - unsigned char *mgnt_pkg = malloc(256); + unsigned char *mgnt_pkg = ccnl_malloc(256); if (!mgnt_pkg) { puts("riot_ccnl_appserver_register: malloc failed"); return; diff --git a/sys/net/ccn_lite/ccnl-riot-compat.c b/sys/net/ccn_lite/ccnl-riot-compat.c index 7edd6bfc83..2771cb39f8 100644 --- a/sys/net/ccn_lite/ccnl-riot-compat.c +++ b/sys/net/ccn_lite/ccnl-riot-compat.c @@ -79,7 +79,7 @@ int riot_send_msg(uint8_t *buf, uint16_t size, uint16_t to) DEBUGMSG(1, "this is a RIOT MSG based connection\n"); DEBUGMSG(1, "size=%" PRIu16 " to=%" PRIu16 "\n", size, to); - uint8_t *buf2 = malloc(sizeof(riot_ccnl_msg_t) + size); + uint8_t *buf2 = ccnl_malloc(sizeof(riot_ccnl_msg_t) + size); if (!buf2) { DEBUGMSG(1, " malloc failed...dorpping msg!\n"); return 0; diff --git a/sys/net/ccn_lite/util/ccn-lite-ctrl.c b/sys/net/ccn_lite/util/ccn-lite-ctrl.c index 115cb14ec1..4e4b7eb49d 100644 --- a/sys/net/ccn_lite/util/ccn-lite-ctrl.c +++ b/sys/net/ccn_lite/util/ccn-lite-ctrl.c @@ -30,6 +30,7 @@ #include "ccnx.h" #include "ccnl.h" #include "ccnl-pdu.h" +#include "ccnl-core.h" // ---------------------------------------------------------------------- @@ -39,13 +40,13 @@ mkNewFaceRequest(unsigned char *out, char *macsrc, char *ip4src, { int len = 0, len2, len3; - unsigned char *contentobj = malloc(500); + unsigned char *contentobj = ccnl_malloc(500); if (!contentobj) { puts("mkNewFaceRequest: malloc failed"); return 0; } - unsigned char *faceinst = malloc(500); + unsigned char *faceinst = ccnl_malloc(500); if (!faceinst) { free(contentobj); puts("mkNewFaceRequest: malloc failed"); @@ -117,13 +118,13 @@ mkPrefixregRequest(unsigned char *out, char reg, char *path, char *faceid) int len = 0, len2, len3; char *cp; - unsigned char *contentobj = malloc(500); + unsigned char *contentobj = ccnl_malloc(500); if (!contentobj) { puts("mkNewFaceRequest: malloc failed"); return 0; } - unsigned char *fwdentry = malloc(500); + unsigned char *fwdentry = ccnl_malloc(500); if (!fwdentry) { free(contentobj); puts("mkNewFaceRequest: malloc failed"); diff --git a/sys/net/ccn_lite/util/ccnl-riot-client.c b/sys/net/ccn_lite/util/ccnl-riot-client.c index f33d7d1f29..6e88162486 100644 --- a/sys/net/ccn_lite/util/ccnl-riot-client.c +++ b/sys/net/ccn_lite/util/ccnl-riot-client.c @@ -51,7 +51,7 @@ int ccnl_riot_client_get(kernel_pid_t relay_pid, char *name, char *reply_buf) memset(segment_string, 0, 16); snprintf(segment_string, 16, "%d", segment); prefix[i] = segment_string; - unsigned char *interest_pkg = malloc(PAYLOAD_SIZE); + unsigned char *interest_pkg = ccnl_malloc(PAYLOAD_SIZE); if (!interest_pkg) { puts("ccnl_riot_client_get: malloc failed"); return 0;