diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-29 11:23:52 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-29 11:23:52 +0000 |
commit | 00aeb6ee00efa98c7e2d6d9bebeb1c4799ba1705 (patch) | |
tree | d86a1c02b36cfc5feea1ba5f22c6899f8a6c0c9c /src/ipcpd/shim-eth-llc/main.c | |
parent | e8875c08ac04a1d9aca342d94d4f788239334f72 (diff) | |
parent | 4de841c26b7208d5395da349ea16c937b1361414 (diff) | |
download | ouroboros-00aeb6ee00efa98c7e2d6d9bebeb1c4799ba1705.tar.gz ouroboros-00aeb6ee00efa98c7e2d6d9bebeb1c4799ba1705.zip |
Merged in sandervrijders/ouroboros/be-bugfixes (pull request #573)
lib, ipcpd, irmd: Fix bugs reported by static analysis
Diffstat (limited to 'src/ipcpd/shim-eth-llc/main.c')
-rw-r--r-- | src/ipcpd/shim-eth-llc/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index 3d186d7a..e5f0cba8 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -166,11 +166,13 @@ static int eth_llc_data_init(void) int ret = -ENOMEM; pthread_condattr_t cattr; - eth_llc_data.fd_to_ef = malloc(sizeof(struct ef) * SYS_MAX_FLOWS); + eth_llc_data.fd_to_ef = + malloc(sizeof(*eth_llc_data.fd_to_ef) * SYS_MAX_FLOWS); if (eth_llc_data.fd_to_ef == NULL) goto fail_fd_to_ef; - eth_llc_data.ef_to_fd = malloc(sizeof(struct ef) * MAX_SAPS); + eth_llc_data.ef_to_fd = + malloc(sizeof(*eth_llc_data.ef_to_fd) * MAX_SAPS); if (eth_llc_data.ef_to_fd == NULL) goto fail_ef_to_fd; |