mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-30 10:27:44 +01:00
Fix memory leak on error condition (#4798).
git-svn-id: svn://localhost/ardour2/branches/3.0@11775 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c38cbac7e7
commit
5de4de613b
1 changed files with 3 additions and 2 deletions
|
|
@ -839,7 +839,8 @@ load_file_into_buffer(void **file_buffer, size_t *file_buffer_length, FILE* stre
|
|||
|
||||
if (fread(*file_buffer, 1, *file_buffer_length, stream) != *file_buffer_length) {
|
||||
g_critical("fread(3) failed: %s", strerror(errno));
|
||||
|
||||
free (*file_buffer);
|
||||
*file_buffer = NULL;
|
||||
return (-6);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue