cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

potential memory leak in ccn-lite-rpc.c #339

Closed mfrey closed 5 years ago

mfrey commented 5 years ago

Description

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.