X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fcurlftpfs%2F0002-free_ftpfs_file-memleak-fix.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fcurlftpfs%2F0002-free_ftpfs_file-memleak-fix.patch;h=4966c9dcfb58f919243e4e82b37bdacc196eef13;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch new file mode 100644 index 0000000..4966c9d --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch @@ -0,0 +1,14 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +Fix a memory leak. See Bug #587250. +--- a/ftpfs.c 2008-04-30 01:05:47.000000000 +0200 ++++ a/ftpfs.c.slesimple 2010-01-01 22:12:10.000000000 +0100 +@@ -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); + } +