diff options
author | Martin Aberg <maberg@gaisler.com> | 2015-08-03 12:12:20 +0200 |
---|---|---|
committer | Martin Aberg <maberg@gaisler.com> | 2015-08-03 12:12:20 +0200 |
commit | 7c603401008b7b7417981ec334411422e8cdc85d (patch) | |
tree | 904ba7107d4aca9ba70509da45e4d861bc188bc4 | |
parent | 39c93acfd6621bb9029908e6a35066a7e64f35dd (diff) |
RMAP: Correct allocation of rmap_async_priv.
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/spw/rmap_async.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c b/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c index 69187e1d72..d37b45a07d 100644 --- a/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c +++ b/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c @@ -37,7 +37,8 @@ void *rmap_async_init(struct rmap_config *config, int response_array_length) struct rmap_async_priv *priv; int status; - priv = (struct rmap_async_priv *)malloc(sizeof(struct rmap_async_priv)); + priv = (struct rmap_async_priv *)malloc(sizeof(struct rmap_async_priv) + + (response_array_length * sizeof(struct rmap_command *))); if ( !priv ) return NULL; |