From: Justin Seyster Date: Thu, 2 Sep 2010 23:53:14 +0000 (-0400) Subject: Fix: allocating just a pointer instead of the whole struct. X-Git-Tag: release-v1.0~48^2~13 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=5c23f1080e4d6beebeb6ae57bb97ee959b7be595;p=interaspect.git Fix: allocating just a pointer instead of the whole struct. --- diff --git a/src/aop-header.c b/src/aop-header.c index b3cad5a..7ab4164 100644 --- a/src/aop-header.c +++ b/src/aop-header.c @@ -232,8 +232,7 @@ insert_prototype (bool has_return_value, const char *name, int num_params, /* Allocate the new prototype and insert it in the hash table (or in the linked list if we happened to find a hash table entry already). */ - prototype = xmalloc (sizeof (struct aop_prototype *) + - (num_params * sizeof (const struct aop_type *))); + prototype = xmalloc (sizeof (struct aop_prototype) + param_types_size); *hash_slot = prototype; prototype->has_return_value = has_return_value;