From: Nils Carlson Date: Thu, 30 Sep 2010 08:09:04 +0000 (+0200) Subject: Fix a zmalloc bug X-Git-Tag: v0.8~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=86699c2035dd69428706ade2d6dfb150ada757cb;p=ust.git Fix a zmalloc bug sizeof(void *) was allocated instead of sizeof(struct probe). Signed-off-by: Nils Carlson --- diff --git a/libust/tracepoint.c b/libust/tracepoint.c index 2b33d84..6fe9cd7 100644 --- a/libust/tracepoint.c +++ b/libust/tracepoint.c @@ -74,7 +74,7 @@ struct tp_probes { static inline void *allocate_probes(int count) { - struct tp_probes *p = zmalloc(count * sizeof(void *) + struct tp_probes *p = zmalloc(count * sizeof(struct probe) + sizeof(struct tp_probes)); return p == NULL ? NULL : p->probes; }