mirror of https://github.com/hak5/openwrt-owl.git
otrx: fix memory leak in otrx_create_append_zeros
A "free" call was missing after allocating a buffer. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>owl
parent
70837168ef
commit
36a92274a8
|
@ -264,9 +264,12 @@ static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) {
|
|||
|
||||
if (fwrite(buf, 1, length, trx) != length) {
|
||||
fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path);
|
||||
free(buf);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
free(buf);
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue