mg(1) does not close DIR on error path

2012-03-24 Thread Igor Zinovik
Hello. mg(1) editor has a small resource leak in make_file_list() function. If it cannot allocate space for `current' list it returns without closing `dirp' with closedir() call. Index: fileio.c === RCS file:

Re: ral(4) diff

2011-03-12 Thread Igor Zinovik
On Mar 10, Tim van der Molen wrote: I have the following ral(4): ral0 at pci0 dev 13 function 0 Ralink RT2561S rev 0x00: irq 5, address 00:1d:7d:49:28:92 ral0: MAC/BBP RT2561C, RF RT2527 After a commit from August 2010 (see http://marc.info/?l=openbsd-cvsm=128095139804862) the ral

[patch] file descriptor leak fix

2010-03-21 Thread Igor Zinovik
Hello, tech@ Following diff fixes file descriptor leak `ifd'. Index: diffreg.c === RCS file: /cvs/src/usr.bin/diff/diffreg.c,v retrieving revision 1.73 diff -u -r1.73 diffreg.c --- diffreg.c 27 Oct 2009 23:59:37 -

[patch] fixes for sendbug

2010-03-21 Thread Igor Zinovik
Hello, tech@ Following diff fixes memory and FILE handle leaks. `acpidir' is allocated via asprintf(3) and `ifp' is opened via popen(3), but not closed. Index: sendbug.c === RCS file: /cvs/src/usr.bin/sendbug/sendbug.c,v

[patch] small sychronization between OpenCVS and OpenRCS code

2010-03-21 Thread Igor Zinovik
Hello, tech@ This diff synchronizes OpenCVS rcs parser code with OpenRCS. It shrinks code by 3 lines, but does exactly the same thing. It also removes `buf' which becomes redundant for this function. Instead of calling strlcpy(3) three times we can put a line in file with fprintf(3).

[patch] fix for file descriptor leak in lpd(8)

2010-03-21 Thread Igor Zinovik
Hello, tech@ Do not leak file descriptor `fd' on error path. Index: printjob.c === RCS file: /cvs/src/usr.sbin/lpr/lpd/printjob.c,v retrieving revision 1.45 diff -u -p -r1.45 printjob.c --- printjob.c 27 Oct 2009 23:59:52

[patch] dhcpd memory leak on error path

2010-03-21 Thread Igor Zinovik
Hello, tech@ Follwoing diff plugs memory leak on error path in dhcpd. Index: confpars.c === RCS file: /cvs/src/usr.sbin/dhcpd/confpars.c,v retrieving revision 1.18 diff -u -p -r1.18 confpars.c --- confpars.c 2 Jan 2010

[patch] memory leak in pfctl_parser

2010-03-20 Thread Igor Zinovik
Hello, tech@ Following diff fixes memory leak. `debug' is allocated via asprintf(3) so we need to free it with free(3). Index: pfctl_parser.c === RCS file: /cvs/src/sbin/pfctl/pfctl_parser.c,v retrieving revision 1.263

Re: Automatic package mirror discovery implementation for pkg_add(1) tool

2010-02-10 Thread Igor Zinovik
:tdb-1.0.6p0: ok (1 to go) fdm-1.6: ok Here is the code: /usr/src/usr.sbin/pkg_add/OpenBSD/AutoMirrorDiscovery.pm # ex:ts=8 sw=4: # $OpenBSD$ # # Copyright (c) 2009 Igor Zinovik zino...@petrsu.ru # # Permission to use, copy, modify, and distribute this software for any # purpose with or without

[patch] httpd/src/modules/ssl/ssl_util_table.c - fd leak

2010-01-20 Thread Igor Zinovik
Hello. Looks like a file descriptor leak? Index: ssl_util_table.c === RCS file: /OpenBSD/src/usr.sbin/httpd/src/modules/ssl/ssl_util_table.c,v retrieving revision 1.6 diff -u -r1.6 ssl_util_table.c --- ssl_util_table.c2

[patch] dhcpd/confpars.c tiny memory leak

2010-01-08 Thread Igor Zinovik
Hello, t...@. dhcpd forgets to free(3) host. Index: usr.sbin/dhcpd/confpars.c === RCS file: /OpenBSD/src/usr.sbin/dhcpd/confpars.c,v retrieving revision 1.18 diff -u -r1.18 confpars.c --- usr.sbin/dhcpd/confpars.c 2 Jan 2010

[patch] lib/libc/yp/yp_all.c mem leak

2010-01-08 Thread Igor Zinovik
Hello, t...@. A bit tricky code in yp_all.c `val' is not freed. It might be allocated but might be not freed when `key' allocation failed. Index: lib/libc/yp/yp_all.c === RCS file: /OpenBSD/src/lib/libc/yp/yp_all.c,v retrieving

Re: [patch] patch:util.c does free memory after strdup(3)

2010-01-08 Thread Igor Zinovik
2010/1/8 Stuart Henderson s...@spacehopper.org: On 2010/01/08 13:33, Owain Ainsworth wrote: Please note that none of your patches apply because of spaces in the whitespace instead of tabs (I applied them manually). Either your mail client is mangling the diffs, or you're copy/pasting the diffs

[patch] bgplg.c probably leaks file descriptor

2010-01-07 Thread Igor Zinovik
Hello, t...@. Seems that bgplg.c leaks file descriptor `fd' in lg_incl(). It opens it, but does not closes. Index: bgplg.c === RCS file: /OpenBSD/src/usr.bin/bgplg/bgplg.c,v retrieving revision 1.7 diff -u -r1.7 bgplg.c ---

[patch] patch:util.c does free memory after strdup(3)

2010-01-07 Thread Igor Zinovik
Hello, t...@. tmpbuf is allocated via strdup(3) but it is leaved unfreed when we leave makedirs() function. Index: util.c === RCS file: /OpenBSD/src/usr.bin/patch/util.c,v retrieving revision 1.33 diff -u -r1.33 util.c --- util.c