[Bug 546104] New: dvb-1.1.0_CVS20080331-38.13: memory leak
http://bugzilla.novell.com/show_bug.cgi?id=546104 Summary: dvb-1.1.0_CVS20080331-38.13: memory leak Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Minor Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: --- I just had a look at factory package dvb-1.1.0_CVS20080331-38.13 source code file dvb-apps/lib/libdvbapi/dvbca.c function dvbca_link_read I notice the following code uint8_t *buf = malloc(data_length + 2); if (buf == NULL) return -1; if ((size = read(fd, buf, data_length+2)) < 2) return -1; so if the read returns less than 2, then buf is a memory leak. Suggest new code uint8_t *buf = malloc(data_length + 2); if (buf == NULL) return -1; if ((size = read(fd, buf, data_length+2)) < 2) { free( buf); return -1; } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=546104 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |duwe@novell.com |ovo.novell.com | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=546104 User rguenther@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=546104#c1 --- Comment #1 from Richard Guenther <rguenther@novell.com> 2009-10-17 08:56:26 MDT --- David, in case the issues are not introduced by a patch local to openSUSE please report the issues upstream. Packagers, please do not add openSUSE-local patches to fix this kind of errors but forward the bugs upstream and close the bugs as RESOLVED UPSTREAM. Note that it is perfectly fine to have "resource leaks" at the end of a program as the kernel will clean up for you. Manually freeing them only increases binary size and runtime. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=546104 http://bugzilla.novell.com/show_bug.cgi?id=546104#c Torsten Duwe <duwe@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com