diff options
author | naddy <naddy@FreeBSD.org> | 2002-08-28 04:13:12 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2002-08-28 04:13:12 +0800 |
commit | ccdaba9290df2103a009163a5ea3c4b748179f82 (patch) | |
tree | e5a37a3b7c07da1f8a3c31340a2d406525114c54 /audio/mpg321/files | |
parent | d7de0c0ce058916cb758bb86d841a3dd224549e3 (diff) | |
download | freebsd-ports-graphics-ccdaba9290df2103a009163a5ea3c4b748179f82.tar.gz freebsd-ports-graphics-ccdaba9290df2103a009163a5ea3c4b748179f82.tar.zst freebsd-ports-graphics-ccdaba9290df2103a009163a5ea3c4b748179f82.zip |
Plug file descriptor leak.
Obtained from: Joe Drew <drew@debian.org>
Diffstat (limited to 'audio/mpg321/files')
-rw-r--r-- | audio/mpg321/files/patch-mpg321.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/audio/mpg321/files/patch-mpg321.c b/audio/mpg321/files/patch-mpg321.c new file mode 100644 index 00000000000..57753566233 --- /dev/null +++ b/audio/mpg321/files/patch-mpg321.c @@ -0,0 +1,34 @@ + +$FreeBSD$ + +--- mpg321.c.orig Sun Mar 24 06:49:20 2002 ++++ mpg321.c Tue Aug 27 22:01:26 2002 +@@ -509,9 +509,6 @@ + + mad_decoder_finish(&decoder); + +- if (quit_now) +- break; +- + if (playbuf.frames) + free(playbuf.frames); + +@@ -521,6 +518,7 @@ + if (playbuf.fd == -1) + { + munmap(playbuf.buf, playbuf.length); ++ close(fd); + } + + else +@@ -535,10 +533,6 @@ + ao_close(playdevice); + + ao_shutdown(); +- +-#if defined(RAW_SUPPORT) || defined(HTTP_SUPPORT) || defined(FTP_SUPPORT) +- if(fd) close(fd); +-#endif + + return(0); + } |