aboutsummaryrefslogtreecommitdiff
path: root/src/core/gnunet-service-core_typemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gnunet-service-core_typemap.c')
-rw-r--r--src/core/gnunet-service-core_typemap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/gnunet-service-core_typemap.c b/src/core/gnunet-service-core_typemap.c
index d2dab5d99..c9774ddec 100644
--- a/src/core/gnunet-service-core_typemap.c
+++ b/src/core/gnunet-service-core_typemap.c
@@ -114,13 +114,13 @@ GSC_TYPEMAP_get_from_message (const struct GNUNET_MessageHeader *msg)
114 GNUNET_break_op (0); 114 GNUNET_break_op (0);
115 return NULL; 115 return NULL;
116 } 116 }
117 ret = GNUNET_malloc (sizeof (struct GSC_TypeMap)); 117 ret = GNUNET_new (struct GSC_TypeMap);
118 memcpy (ret, &msg[1], sizeof (struct GSC_TypeMap)); 118 memcpy (ret, &msg[1], sizeof (struct GSC_TypeMap));
119 return ret; 119 return ret;
120 case GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP: 120 case GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP:
121 GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# type maps received"), 121 GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# type maps received"),
122 1, GNUNET_NO); 122 1, GNUNET_NO);
123 ret = GNUNET_malloc (sizeof (struct GSC_TypeMap)); 123 ret = GNUNET_new (struct GSC_TypeMap);
124 dlen = sizeof (struct GSC_TypeMap); 124 dlen = sizeof (struct GSC_TypeMap);
125 if ((Z_OK != 125 if ((Z_OK !=
126 uncompress ((Bytef *) ret, &dlen, (const Bytef *) &msg[1], 126 uncompress ((Bytef *) ret, &dlen, (const Bytef *) &msg[1],
@@ -242,7 +242,7 @@ GSC_TYPEMAP_extend (const struct GSC_TypeMap *tmap, const uint16_t * types,
242 struct GSC_TypeMap *ret; 242 struct GSC_TypeMap *ret;
243 unsigned int i; 243 unsigned int i;
244 244
245 ret = GNUNET_malloc (sizeof (struct GSC_TypeMap)); 245 ret = GNUNET_new (struct GSC_TypeMap);
246 if (NULL != tmap) 246 if (NULL != tmap)
247 memcpy (ret, tmap, sizeof (struct GSC_TypeMap)); 247 memcpy (ret, tmap, sizeof (struct GSC_TypeMap));
248 for (i = 0; i < tcnt; i++) 248 for (i = 0; i < tcnt; i++)
@@ -259,7 +259,7 @@ GSC_TYPEMAP_extend (const struct GSC_TypeMap *tmap, const uint16_t * types,
259struct GSC_TypeMap * 259struct GSC_TypeMap *
260GSC_TYPEMAP_create () 260GSC_TYPEMAP_create ()
261{ 261{
262 return GNUNET_malloc (sizeof (struct GSC_TypeMap)); 262 return GNUNET_new (struct GSC_TypeMap);
263} 263}
264 264
265 265