]> git.lttng.org Git - ust.git/commitdiff
Fix a zmalloc bug
authorNils Carlson <nils.carlson@ericsson.com>
Thu, 30 Sep 2010 08:09:04 +0000 (10:09 +0200)
committerNils Carlson <nils.carlson@ericsson.com>
Thu, 30 Sep 2010 08:12:18 +0000 (10:12 +0200)
sizeof(void *) was allocated instead of sizeof(struct probe).

Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
libust/tracepoint.c

index 2b33d84428ef29557d7897788c6aa816c7076545..6fe9cd7569444a79895d0fe7133e8a27c8e1ed4c 100644 (file)
@@ -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;
 }
This page took 0.027149 seconds and 4 git commands to generate.