mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix NULL ptr dereference
This commit is contained in:
parent
03247eeba8
commit
fc58fbb08f
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ int sample_init(struct sample *s)
|
|||
|
||||
struct sample * sample_alloc(struct pool *p)
|
||||
{
|
||||
struct sample *s = pool_get(p);
|
||||
struct sample *s;
|
||||
|
||||
s = pool_get(p);
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
s->pool_off = (char *) p - (char *) s;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue