There is a potential memory leak in ccn-lite-rpc.c in line 368. The function allocates memory for the variable expr and nonce. However, if no memory for the variable nonce can be allocated the function does not release the previously allocated memory for variable expr.
Steps to reproduce the issue
This bug was identified by clangs static analyzer.
Description
There is a potential memory leak in
ccn-lite-rpc.c
in line 368. The function allocates memory for the variableexpr
andnonce
. However, if no memory for the variablenonce
can be allocated the function does not release the previously allocated memory for variableexpr
.Steps to reproduce the issue
This bug was identified by clangs static analyzer.