void-packages/srcpkgs/curlftpfs/patches/curlftpfs-0.9.2-memleak#591...

12 lines
304 B
Diff

--- ftpfs.c
+++ ftpfs.c
@@ -615,6 +615,8 @@ static void free_ftpfs_file(struct ftpfs
sem_destroy(&fh->data_need);
sem_destroy(&fh->data_written);
sem_destroy(&fh->ready);
+ if (fh->buf.size) { buf_free(&fh->buf); }
+ if (fh->stream_buf.size) { buf_free(&fh->stream_buf); }
free(fh);
}