summaryrefslogtreecommitdiff
path: root/crypto/af_alg.c
diff options
context:
space:
mode:
authorWenwen Wang <wenwen@cs.uga.edu>2020-01-25 17:33:29 +0300
committerDavid S. Miller <davem@davemloft.net>2020-01-26 00:01:51 +0300
commitfa865ba183d61c1ec8cbcab8573159c3b72b89a4 (patch)
tree4be17674bd260e025ac2bff006fbc98afdbb5a5b /crypto/af_alg.c
parent6badad1c1d354db1f7bc216319d81884411d5098 (diff)
downloadlinux-fa865ba183d61c1ec8cbcab8573159c3b72b89a4.tar.xz
firestream: fix memory leaks
In fs_open(), 'vcc' is allocated through kmalloc() and assigned to 'atm_vcc->dev_data.' In the following execution, if an error occurs, e.g., there is no more free channel, an error code EBUSY or ENOMEM will be returned. However, 'vcc' is not deallocated, leading to memory leaks. Note that, in normal cases where fs_open() returns 0, 'vcc' will be deallocated in fs_close(). But, if fs_open() fails, there is no guarantee that fs_close() will be invoked. To fix this issue, deallocate 'vcc' before the error code is returned. Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/af_alg.c')
0 files changed, 0 insertions, 0 deletions