1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

protobuf: fix segfault

This commit is contained in:
Steffen Vogel 2018-01-17 01:22:43 +01:00
parent cb8cc1e942
commit c425353915

View file

@ -154,7 +154,8 @@ int protobuf_sscan(char *buf, size_t len, size_t *rbytes, struct sample *smps[],
smp->length = j;
}
*rbytes = villas__node__message__get_packed_size(pb_msg);
if (rbytes)
*rbytes = villas__node__message__get_packed_size(pb_msg);
villas__node__message__free_unpacked(pb_msg, NULL);