FreeBSD Bugzilla – Attachment 152584 Details for
Bug 197350
sysutils/cbsd add patch to fix various resource leaks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix resource leaks
cbsd.patch (text/plain), 1.31 KB, created by
Oleg Ginzburg
on 2015-02-05 14:45:38 UTC
(
hide
)
Description:
fix resource leaks
Filename:
MIME Type:
Creator:
Oleg Ginzburg
Created:
2015-02-05 14:45:38 UTC
Size:
1.31 KB
patch
obsolete
>diff -ruN cbsd.orig/Makefile cbsd/Makefile >--- cbsd.orig/Makefile 2015-01-27 15:02:23.000000000 +0300 >+++ cbsd/Makefile 2015-02-05 17:35:41.718953000 +0300 >@@ -2,6 +2,7 @@ > > PORTNAME= cbsd > PORTVERSION= 10.1.4 >+PORTREVISION= 1 > CATEGORIES= sysutils > > MAINTAINER= olevole@olevole.ru >diff -ruN cbsd.orig/files/patch-bin-cbsdsh-cbsd_fwatch.c cbsd/files/patch-bin-cbsdsh-cbsd_fwatch.c >--- cbsd.orig/files/patch-bin-cbsdsh-cbsd_fwatch.c 1970-01-01 03:00:00.000000000 +0300 >+++ cbsd/files/patch-bin-cbsdsh-cbsd_fwatch.c 2015-02-05 17:34:52.160438000 +0300 >@@ -0,0 +1,39 @@ >+--- bin/cbsdsh/cbsd_fwatch.c.orig 2015-02-05 17:33:24.019144000 +0300 >++++ bin/cbsdsh/cbsd_fwatch.c 2015-02-05 16:57:53.000000000 +0300 >+@@ -95,7 +95,6 @@ >+ return 1; >+ } >+ >+- >+ if ((fd = open(watchfile, O_RDONLY)) == -1) { >+ out2fmt_flush("Cannot open: %s\n", watchfile); >+ ckfree(watchfile); >+@@ -117,6 +116,7 @@ >+ out2fmt_flush("kevent\n"); >+ close(fd); >+ ckfree(watchfile); >++ close(kq); >+ return 1; >+ } >+ >+@@ -134,9 +134,12 @@ >+ out2fmt_flush("kevent\n"); >+ close(fd); >+ ckfree(watchfile); >++ close(kq); >+ return 1; >+ } >+ >++ close(kq); >++ >+ if (nev != 0) { >+ if (ev.fflags & NOTE_DELETE) { >+ out2fmt_flush("deleted\n"); >+@@ -173,5 +176,7 @@ >+ ev.fflags &= ~NOTE_REVOKE; >+ } >+ } >++ >++ ckfree(watchfile); >+ return 0; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197350
: 152584