1
0
Fork 0
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:
Steffen Vogel 2018-04-26 09:32:13 +02:00
parent 03247eeba8
commit fc58fbb08f

View file

@ -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;