View Issue Details

IDProjectCategoryView StatusLast Update
0004798ardourbugspublic2020-04-19 20:16
Reporterahurst Assigned Tocth103  
PrioritynormalSeveritytrivialReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0-beta3 
Target Version3.0 
Summary0004798: Memory leak
DescriptionHigh impact static analysis bug:

An allocated resource is leaked in libs/evoral/src/libsmf/smf_load.c:913.

A free(file_buffer) should probably be added at line 842.
Additional Information*** "file_buffer" is allocated.
833 *file_buffer = malloc(*file_buffer_length);
834 if (*file_buffer == NULL) {
835 g_critical("malloc(3) failed: %s", strerror(errno));
836
837 return (-5);
838 }
839
840 if (fread(*file_buffer, 1, *file_buffer_length, stream) != *file_buffer_length) {
841 g_critical("fread(3) failed: %s", strerror(errno));
*** Function returns without freeing "file_buffer".
842
843 return (-6);
844 }

909 void *file_buffer;
910 smf_t *smf;
911
912 if (load_file_into_buffer(&file_buffer, &file_buffer_length, file))
*** "file_buffer" goes out of scope without being freed by its caller.
913 return (NULL);
TagsNo tags attached.

Activities

cth103

2012-04-01 15:06

administrator   ~0013058

Fixed in SVN 11775.

system

2020-04-19 20:16

developer   ~0023010

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2012-03-27 23:50 ahurst New Issue
2012-03-28 12:24 cth103 cost => 0.00
2012-03-28 12:24 cth103 Fixed in Version => 3.0 beta4
2012-03-28 14:23 cth103 Fixed in Version 3.0 beta4 =>
2012-03-28 14:23 cth103 Target Version => 3.0 beta4
2012-04-01 15:06 cth103 Note Added: 0013058
2012-04-01 15:06 cth103 Status new => resolved
2012-04-01 15:06 cth103 Resolution open => fixed
2012-04-01 15:06 cth103 Assigned To => cth103
2012-05-23 15:08 cth103 Target Version 3.0 beta4 => 3.0
2020-04-19 20:16 system Note Added: 0023010
2020-04-19 20:16 system Status resolved => closed